Skip to content

Commit

Permalink
Fix test runs with no charm_name
Browse files Browse the repository at this point in the history
Fix z-o-t so that tests that specify an application name can
be run irrespective of whether the charm_name has been set in
tests.yaml. Closes issue openstack-charmers#442
  • Loading branch information
Liam Young committed Oct 12, 2020
1 parent 581427d commit 299fae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zaza/openstack/charm_tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ def setUpClass(cls, application_name=None, model_alias=None):
else:
cls.model_name = model.get_juju_model()
cls.test_config = lifecycle_utils.get_charm_config(fatal=False)
charm_under_test_name = cls.test_config['charm_name']

if application_name:
cls.application_name = application_name
else:
charm_under_test_name = cls.test_config['charm_name']
deployed_app_names = model.sync_deployed(model_name=cls.model_name)
if charm_under_test_name in deployed_app_names:
# There is an application named like the charm under test.
Expand Down

0 comments on commit 299fae6

Please sign in to comment.