Automation: Fix different names for cleanup

This commit is contained in:
Sheng Yang 2013-07-23 13:11:20 -07:00
parent c1e6968464
commit 7faa71dc68
6 changed files with 17 additions and 26 deletions

View File

@ -611,10 +611,7 @@ class TestRouterRestart(cloudstackTestCase):
return
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
# No need
return
@attr(tags = ["advanced", "basic", "sg", "advancedns", "eip"])

View File

@ -288,7 +288,7 @@ class TestCreateRvRNetwork(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@ -486,7 +486,7 @@ class TestCreateRvRNetworkNonDefaultGuestCidr(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@ -693,7 +693,7 @@ class TestRVRInternals(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@ -1013,7 +1013,7 @@ class TestRvRRedundancy(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return

View File

@ -195,7 +195,7 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return

View File

@ -194,7 +194,7 @@ class TestRvRUpgradeDowngrade(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return

View File

@ -162,12 +162,20 @@ class TestAttachVolume(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self._cleanup)
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
self.debug("Warning: Exception during cleanup : %s" % e)
#raise Exception("Warning: Exception during cleanup : %s" % e)
return
@classmethod
def tearDownClass(cls):
try:
cls.api_client = super(TestAttachVolume, cls).getClsTestClient().getApiClient()
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
@attr(tags = ["advanced", "advancedns"])
def test_01_volume_attach(self):
"""Test Attach volumes (max capacity)
@ -370,20 +378,6 @@ class TestAttachVolume(cloudstackTestCase):
)
return
def tearDown(self):
#Clean up, terminate the created volumes
cleanup_resources(self.apiclient, self.cleanup)
return
@classmethod
def tearDownClass(cls):
try:
cls.api_client = super(TestAttachVolume, cls).getClsTestClient().getApiClient()
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
class TestAttachDetachVolume(cloudstackTestCase):
@classmethod

View File

@ -185,7 +185,7 @@ class TestVPCOffering(cloudstackTestCase):
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return