Merge pull request #135 from gnuoy/fix-resource-cleanup
Guard against run_resource_cleanup being unset
This commit is contained in:
@@ -93,6 +93,8 @@ def audit_assertions(action,
|
||||
class OpenStackBaseTest(unittest.TestCase):
|
||||
"""Generic helpers for testing OpenStack API charms."""
|
||||
|
||||
run_resource_cleanup = False
|
||||
|
||||
@classmethod
|
||||
def resource_cleanup(cls):
|
||||
"""Cleanup any resources created during the test run.
|
||||
@@ -124,7 +126,6 @@ class OpenStackBaseTest(unittest.TestCase):
|
||||
cls.lead_unit = model.get_lead_unit_name(
|
||||
cls.application_name,
|
||||
model_name=cls.model_name)
|
||||
cls.run_resource_cleanup = False
|
||||
logging.debug('Leader unit is {}'.format(cls.lead_unit))
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
||||
Reference in New Issue
Block a user