Charm's unit_test never returns if config.yaml is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When running the python unit_tests on my charm and there is no config.yaml file present, the nosetests command never returns, unless I do a <Ctrl>-C. It then output the results of the tests.
How to reproduce :
===============
$ bzr branch lp:~louis-bouchard/charms/trusty/crashdump/trunk crashdump
$ cd crashdump
$ make unit_test
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
User does not have the privilege to change this file [Errno 13] Permission denied: '/tmp/tmpNVhC8M
....
-------
Ran 4 tests in 0.046s
OK
$ rm -f config.yaml
$ make unit_test ##### The nosetests process will run until <Ctrl>-C is entered
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
^C
-------
Ran 1 test in 2.947s
OK
This is an issue with the helpers you're using in your charm's unit_test directory. They attempt to bootstrap with the config file without checking if the config file exists or not.