summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-04-11 14:24:07 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-04-11 14:24:07 -0600
commit40166118d8dcb7d6fd1a8008cb3e2ca5f7c51e8f (patch)
treecc64fa0c15b07023782ea09890207c42d5d14a76
parentb3106eca334e09501cd62739157ae805ee76ff6c (diff)
Fixed two tests that never had their networks removed on tearDown()
JIRA: SNAPS-56 Change-Id: I43d47f59f5b15805dce425f148ec5c990055ca73 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--snaps/openstack/tests/create_instance_tests.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/snaps/openstack/tests/create_instance_tests.py b/snaps/openstack/tests/create_instance_tests.py
index 5e7fbf1..ab22ede 100644
--- a/snaps/openstack/tests/create_instance_tests.py
+++ b/snaps/openstack/tests/create_instance_tests.py
@@ -312,11 +312,17 @@ class SimpleHealthCheck(OSIntegrationTestCase):
if os.path.isfile(self.keypair_priv_filepath):
os.remove(self.keypair_priv_filepath)
+ if self.network_creator:
+ try:
+ self.network_creator.clean()
+ except Exception as e:
+ logger.error('Unexpected exception cleaning network with message - ' + e.message)
+
if self.flavor_creator:
try:
self.flavor_creator.clean()
except Exception as e:
- logger.error('Unexpected exception cleaning network with message - ' + e.message)
+ logger.error('Unexpected exception cleaning flavor with message - ' + e.message)
if self.image_creators:
try:
@@ -396,7 +402,7 @@ class CreateInstanceSimpleTests(OSIntegrationTestCase):
self.image_creators = list()
self.flavor_creator = None
- self.net_creator = None
+ self.network_creator = None
self.inst_creator = None
try:
@@ -460,9 +466,9 @@ class CreateInstanceSimpleTests(OSIntegrationTestCase):
except Exception as e:
logger.error('Unexpected exception cleaning flavor with message - ' + e.message)
- if self.net_creator:
+ if self.network_creator:
try:
- self.net_creator.clean()
+ self.network_creator.clean()
except Exception as e:
logger.error('Unexpected exception cleaning network with message - ' + e.message)