Do not hide real exception on test failure

This commit is contained in:
Aurelien Lourot
2020-09-24 10:33:11 +02:00
parent 9406ea0380
commit 6b93fb3acb
2 changed files with 5 additions and 9 deletions

View File

@@ -74,13 +74,9 @@ class HeatBasicDeployment(test_utils.OpenStackBaseTest):
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."""

View File

@@ -244,7 +244,7 @@ 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
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
@@ -399,7 +399,7 @@ class BasePolicydSpecialization(PolicydTest,
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')):