Skip to content

Commit

Permalink
Merge pull request openstack-charmers#425 from openstack-charmers/lou…
Browse files Browse the repository at this point in the history
…rot/bug/1895300

Do not hide real exception on test failure
  • Loading branch information
fnordahl authored Sep 25, 2020
2 parents 0a0a7af + c09a9af commit 1ab3aea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 3 additions & 7 deletions zaza/openstack/charm_tests/heat/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,9 @@ def test_100_domain_setup(self):
def test_400_heat_resource_types_list(self):
"""Check default resource list behavior and confirm functionality."""
logging.info('Checking default heat resource list...')
try:
types = self.heat_client.resource_types.list()
self.assertIsInstance(types, list, "Resource type is not a list!")
self.assertGreater(len(types), 0, "Resource type list len is zero")
except Exception as e:
msg = 'Resource type list failed: {}'.format(e)
self.fail(msg)
types = self.heat_client.resource_types.list()
self.assertIsInstance(types, list, "Resource type is not a list!")
self.assertGreater(len(types), 0, "Resource type list len is zero")

def test_410_heat_stack_create_delete(self):
"""Create stack, confirm nova compute resource, delete stack."""
Expand Down
6 changes: 3 additions & 3 deletions zaza/openstack/charm_tests/policyd/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ class BasePolicydSpecialization(PolicydTest,
by the policy override in the `_rule` class variable. The method should
pass cleanly without the override in place.
The test_003_test_overide_is_observed will then apply the override and then
call get_client_and_attempt_operation() again, and this time it should
The test_003_test_override_is_observed will then apply the override and
then call get_client_and_attempt_operation() again, and this time it should
detect the failure and raise the PolicydOperationFailedException()
exception. This will be detected as the override working and thus the test
will pass.
Expand Down Expand Up @@ -399,7 +399,7 @@ def get_keystone_session_admin_user(self, ip):
return openstack_utils.get_keystone_session(
openstack_utils.get_overcloud_auth(address=ip))

def test_003_test_overide_is_observed(self):
def test_003_test_override_is_observed(self):
"""Test that the override is observed by the underlying service."""
if (openstack_utils.get_os_release() <
openstack_utils.get_os_release('groovy_victoria')):
Expand Down

0 comments on commit 1ab3aea

Please sign in to comment.