From 5e451f899c41ac22dd2da32f2592dae958dad093 Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Thu, 25 Oct 2012 13:43:16 +0530 Subject: [PATCH] Summary: Removing dbclient.close calls from integration tests Detail: Marvin auto-manages its connections now and there is no need to call dbclient.close on tearDown of the test setup. Signed-off-by: Prasanna Santhanam 1351152797 +0530 --- test/integration/component/test_blocker_bugs.py | 1 - test/integration/component/test_egress_rules.py | 11 ----------- test/integration/component/test_eip_elb.py | 2 -- test/integration/component/test_project_resources.py | 1 - test/integration/component/test_security_groups.py | 7 ------- test/integration/component/test_templates.py | 1 - test/integration/smoke/test_disk_offerings.py | 2 -- test/integration/smoke/test_hosts.py | 3 +-- test/integration/smoke/test_iso.py | 3 --- test/integration/smoke/test_service_offerings.py | 2 -- test/integration/smoke/test_templates.py | 3 --- 11 files changed, 1 insertion(+), 35 deletions(-) diff --git a/test/integration/component/test_blocker_bugs.py b/test/integration/component/test_blocker_bugs.py index 2285afa8e89..d40fc9f6a40 100644 --- a/test/integration/component/test_blocker_bugs.py +++ b/test/integration/component/test_blocker_bugs.py @@ -407,7 +407,6 @@ class TestTemplate(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py index 982f036bdf7..f888163a1cf 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -138,7 +138,6 @@ class TestDefaultSecurityGroupEgress(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -297,7 +296,6 @@ class TestAuthorizeIngressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -455,7 +453,6 @@ class TestDefaultGroupEgress(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -656,7 +653,6 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -839,7 +835,6 @@ class TestRevokeEgressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1101,7 +1096,6 @@ class TestInvalidAccountAuthroize(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1223,7 +1217,6 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1471,7 +1464,6 @@ class TestMultipleAccountsEgressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1768,7 +1760,6 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1980,7 +1971,6 @@ class TestInvalidParametersForEgress(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -2163,7 +2153,6 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/component/test_eip_elb.py b/test/integration/component/test_eip_elb.py index 7c28c3d2343..c3d650b3d41 100644 --- a/test/integration/component/test_eip_elb.py +++ b/test/integration/component/test_eip_elb.py @@ -176,7 +176,6 @@ class TestEIP(cloudstackTestCase): try: #Clean up, terminate the created network offerings cleanup_resources(self.apiclient, self.cleanup) - self.dbclient.close() except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return @@ -999,7 +998,6 @@ class TestELB(cloudstackTestCase): try: #Clean up, terminate the created network offerings cleanup_resources(self.apiclient, self.cleanup) - self.dbclient.close() except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return diff --git a/test/integration/component/test_project_resources.py b/test/integration/component/test_project_resources.py index a32ca74c2e5..cf3b593dad4 100644 --- a/test/integration/component/test_project_resources.py +++ b/test/integration/component/test_project_resources.py @@ -1172,7 +1172,6 @@ class TestSecurityGroup(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py index 1cad467416a..5c737d7ea97 100644 --- a/test/integration/component/test_security_groups.py +++ b/test/integration/component/test_security_groups.py @@ -110,7 +110,6 @@ class TestDefaultSecurityGroup(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -383,7 +382,6 @@ class TestAuthorizeIngressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -519,7 +517,6 @@ class TestRevokeIngressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -678,7 +675,6 @@ class TestDhcpOnlyRouter(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -815,7 +811,6 @@ class TestdeployVMWithUserData(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1019,7 +1014,6 @@ class TestDeleteSecurityGroup(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -1265,7 +1259,6 @@ class TestIngressRule(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py index 0aa60616fef..407f8ed3bb0 100644 --- a/test/integration/component/test_templates.py +++ b/test/integration/component/test_templates.py @@ -113,7 +113,6 @@ class TestCreateTemplate(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/smoke/test_disk_offerings.py b/test/integration/smoke/test_disk_offerings.py index eeb514aa378..147904e6b60 100644 --- a/test/integration/smoke/test_disk_offerings.py +++ b/test/integration/smoke/test_disk_offerings.py @@ -49,7 +49,6 @@ class TestCreateDiskOffering(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -112,7 +111,6 @@ class TestDiskOfferings(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/smoke/test_hosts.py b/test/integration/smoke/test_hosts.py index ad443256f3f..260ca9fa8c9 100644 --- a/test/integration/smoke/test_hosts.py +++ b/test/integration/smoke/test_hosts.py @@ -109,7 +109,6 @@ class TestHosts(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -226,4 +225,4 @@ class TestHosts(cloudstackTestCase): cluster.hypervisortype, "Check hypervisor type with is " + v["hypervisor"] + " or not" ) - return \ No newline at end of file + return diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index 17da99c0e36..6ed0a18dc8d 100644 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -108,8 +108,6 @@ class TestCreateIso(cloudstackTestCase): def tearDown(self): try: - - self.dbclient.close() #Clean up, terminate the created ISOs cleanup_resources(self.apiclient, self.cleanup) @@ -247,7 +245,6 @@ class TestISO(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created ISOs, VMs cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/smoke/test_service_offerings.py b/test/integration/smoke/test_service_offerings.py index 5913338a207..e6979116d80 100644 --- a/test/integration/smoke/test_service_offerings.py +++ b/test/integration/smoke/test_service_offerings.py @@ -52,7 +52,6 @@ class TestCreateServiceOffering(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -132,7 +131,6 @@ class TestServiceOfferings(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index d68371667b5..9fefa900eb9 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -112,7 +112,6 @@ class TestCreateTemplate(cloudstackTestCase): def tearDown(self): try: - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup) @@ -418,8 +417,6 @@ class TestTemplates(cloudstackTestCase): def tearDown(self): try: - - self.dbclient.close() #Clean up, terminate the created templates cleanup_resources(self.apiclient, self.cleanup)