]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat tests : functional tests remove erroneous finally clause
authorSteven Hardy <shardy@redhat.com>
Thu, 3 Jan 2013 14:36:53 +0000 (14:36 +0000)
committerSteven Hardy <shardy@redhat.com>
Thu, 3 Jan 2013 16:52:39 +0000 (16:52 +0000)
Some tests have had a finally clause added which means they delete the
stack before doing any tests, even when it is created successfully.  Doh!

Change-Id: I7cefd313b9f810067304fe19f58a038226555b86
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat/tests/functional/test_CFN_API_Actions.py
heat/tests/functional/test_CFN_API_Actions_Boto.py
heat/tests/functional/test_CFN_API_UpdateStack.py

index 75ce1802cb38098db841f1ae33c61d79daae4636..6c0b9d8c443c45ae908d96df7cbd8f83925c23c6 100644 (file)
@@ -86,8 +86,10 @@ class CfnApiFunctionalTest(unittest.TestCase):
             # Match the expected format for an instance's physical resource ID
             cls.phys_res_id_re = re.compile(
                 "^[0-9a-z]*-[0-9a-z]*-[0-9a-z]*-[0-9a-z]*-[0-9a-z]*$")
-        finally:
+        except Exception as ex:
+            print "setupAll failed : %s" % ex
             cls.stack.cleanup()
+            raise
 
     @classmethod
     def teardownAll(cls):
index c51906f16a49c536ee18c1c5a0baf1074d278d21..165c1948aa232472bc163a54d525848f33b237a5 100644 (file)
@@ -88,8 +88,10 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
             # Match the expected format for an instance's physical resource ID
             cls.phys_res_id_re = re.compile(
                 "^[0-9a-z]*-[0-9a-z]*-[0-9a-z]*-[0-9a-z]*-[0-9a-z]*$")
-        finally:
+        except Exception as ex:
+            print "setupAll failed : %s" % ex
             cls.stack.cleanup()
+            raise
 
     @classmethod
     def teardownAll(cls):
index b207fda8b1c48121435e7b8511f09a6d6b3a6329..fac22168469d8e154c58895e354b7cac1cd23090 100644 (file)
@@ -63,8 +63,10 @@ class CfnApiUpdateStackFunctionalTest(unittest.TestCase):
             cls.WikiDatabase.wait_for_provisioning()
             cls.logical_resource_status = "CREATE_COMPLETE"
             cls.stack_status = "CREATE_COMPLETE"
-        finally:
+        except Exception as ex:
+            print "setupAll failed : %s" % ex
             cls.stack.cleanup()
+            raise
 
     @classmethod
     def teardownAll(cls):