Code review comment for lp:~rcj/charms/precise/nrpe/trunk

Revision history for this message
Adam Israel (aisrael) wrote :

Hi Robert,

Thanks for all of your efforts getting this charm cleaned up. I had the opportunity to review the charm today, and wanted to provide some feedback.

I attempted to run the tests both manually, and how the automated testing runs (using bundletester).

Bundletester, run from the charm directory, failed:

$ bundletester -l DEBUG
...
DEBUG:runner:call ['/vagrant/precise/nrpe/tests/20-local_monitors']
DEBUG:runner:
Traceback (most recent call last):
  File "/vagrant/precise/nrpe/tests/20-local_monitors", line 25, in <module>
    with open('../test-monitors.yaml', 'r') as monitors_file:
FileNotFoundError: [Errno 2] No such file or directory: '../test-monitors.yaml'

DEBUG:runner:Exit Code: 1
    20-local_monitors

The 'test-monitors.yaml' file exists in the charm root, but with bundletester run from the charm root, I suspect it's checking for that file outside of the charm, instead of relative to the test script.

Next, I reset my environment and ran the tests by hand. I still encountered an error running 20-local_monitors, however.

$ ./20-local_monitors
2014-10-29 16:02:31 Starting deployment of local
2014-10-29 16:02:31 Deploying services...
2014-10-29 16:02:38 Adding relations...
2014-10-29 16:02:39 Adding relation nrpe:local-monitors <-> apache2:local-monitors
2014-10-29 16:03:39 Deployment complete in 69.14 seconds
Expected file on nrpe not found: /etc/nagios/nrpe.d/check_true.cfg

review: Needs Fixing

« Back to merge proposal