Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions test/integration/component/test_affinity_groups_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,12 @@ def setUpClass(cls):
cls.api_client = cls.testClient.getApiClient()
cls.services = Services().services

cls._cleanup = []

#Get Zone, Domain and templates
cls.rootdomain = get_domain(cls.api_client)
cls.domain = Domain.create(cls.api_client, cls.services["domain"])
cls._cleanup.append(cls.domain)

cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
cls.template = get_template(
Expand Down Expand Up @@ -177,21 +180,11 @@ def setUp(self):
self.cleanup = []

def tearDown(self):
try:
# #Clean up, terminate the created instance, volumes and snapshots
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
super(TestCreateAffinityGroup, self).tearDownClass()

@classmethod
def tearDownClass(cls):
try:
#Clean up, terminate the created templates
cls.domain.delete(cls.api_client, cleanup=True)
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
super(TestCreateAffinityGroup, cls).tearDownClass()

def create_aff_grp(self, api_client=None, aff_grp=None, aff_grp_name=None, projectid=None):

Expand Down
Loading