Skip to content

Commit d222f1a

Browse files
committed
cleanup unconditionally
1 parent cf6671c commit d222f1a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: test/integration/smoke/test_hostha_kvm.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def setUp(self):
7979
self.apiclient,
8080
self.services["service_offerings"]["hasmall"]
8181
)
82+
self.cleanup = [self.service_offering]
8283

8384
self.template = get_test_template(
8485
self.apiclient,
@@ -87,7 +88,6 @@ def setUp(self):
8788
)
8889

8990
self.configureAndDisableHostHa()
90-
self.cleanup = [self.service_offering]
9191

9292
def updateConfiguration(self, name, value):
9393
cmd = updateConfiguration.updateConfigurationCmd()
@@ -116,9 +116,10 @@ def tearDown(self):
116116
self.dbclient.execute("delete from mshost where runid=%s" % self.getFakeMsRunId())
117117
self.dbclient.execute("delete from cluster_details where name='outOfBandManagementEnabled'")
118118
self.dbclient.execute("delete from data_center_details where name='outOfBandManagementEnabled'")
119-
cleanup_resources(self.apiclient, self.cleanup)
120119
except Exception as e:
121120
raise Exception("Warning: Exception during cleanup : %s" % e)
121+
finally:
122+
super(TestHAKVM, self).tearDown()
122123

123124
def getHostHaEnableCmd(self):
124125
cmd = enableHAForHost.enableHAForHostCmd()
@@ -292,7 +293,6 @@ def test_hostha_enable_ha_when_host_in_maintenance(self):
292293
# Enable HA
293294
self.configureAndEnableHostHa()
294295

295-
296296
# Prepare for maintenance Host
297297
self.setHostToMaintanance(self.host.id)
298298

@@ -341,7 +341,6 @@ def test_remove_ha_provider_not_possible(self):
341341
"""
342342
self.logger.debug("Starting test_remove_ha_provider_not_possible")
343343

344-
345344
# Enable HA
346345
self.apiclient.configureHAForHost(self.getHostHaConfigCmd())
347346
cmd = self.getHostHaEnableCmd()
@@ -393,7 +392,6 @@ def test_hostha_kvm_host_degraded(self):
393392
self.startAgent()
394393
self.waitUntilHostInState("Available")
395394

396-
397395
@attr(tags=["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true")
398396
def test_hostha_kvm_host_recovering(self):
399397
"""
@@ -581,7 +579,6 @@ def getIpmiServerIp(self):
581579
return s.getsockname()[0]
582580

583581
def get_non_configured_ha_host(self):
584-
585582
response = list_hosts(
586583
self.apiclient,
587584
type='Routing'

0 commit comments

Comments
 (0)