Charm's unit_test never returns if config.yaml is missing

Bug #1474824 reported by Louis Bouchard
6
This bug affects 1 person
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/kdump-tools.ref'
....
----------------------------------------------------------------------
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

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

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.

Changed in charm-helpers:
status: New → Invalid
Revision history for this message
Louis Bouchard (louis) wrote :

This is not a bug with the charm-helpers, but a side-effect of using the test_utils.py script that expects the config.yaml file to be there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.