summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Levensalor <r.levensalor@cablelabs.com>2017-04-11 21:40:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-11 21:40:13 +0000
commita9b5b7d0135ab6d86e4ecd535699f70e7323302c (patch)
treeaf1d03f607039bcc244b19280ad7b1904668505a
parente64bf898644b45f28f9df31dd054b8864e4828b8 (diff)
parent40166118d8dcb7d6fd1a8008cb3e2ca5f7c51e8f (diff)
Merge "Fixed two tests that never had their networks removed on tearDown()"
-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 2cb1cdc..765def7 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)