DaanHoogland commented on code in PR #7190:
URL: https://github.com/apache/cloudstack/pull/7190#discussion_r1102525169


##########
test/integration/smoke/test_deploy_vm_extra_config_data.py:
##########
@@ -63,34 +63,27 @@ def setUpClass(cls):
 
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
 
+        cls._cleanup = []
+
         # Create an account, network, and IP addresses
         cls.account = Account.create(
             cls.apiclient,
             cls.services["account"],
             domainid=cls.domain.id
         )
+        cls._cleanup.append(cls.account)
+
         cls.service_offering = ServiceOffering.create(
             cls.apiclient,
             cls.services["service_offerings"]["small"]
         )
-
-        cls.cleanup = [
-            cls.account,
-            cls.service_offering
-        ]
+        cls._cleanup.append(cls.service_offering)
 
         cls.hosts_hugepages = cls.set_hosts_hugepages()
 
     @classmethod
     def tearDownClass(cls):
-        try:
-            cls.apiclient = super(TestAddConfigtoDeployVM, 
cls).getClsTestClient().getApiClient()
-            cls.reset_hosts_hugepages()
-            # Clean up, terminate the created templates
-            cleanup_resources(cls.apiclient, cls.cleanup)
-
-        except Exception as e:
-            raise Exception("Warning: Exception during cleanup : %s" % e)
+        super(TestAddConfigtoDeployVM, cls).tearDownClass()

Review Comment:
   @weizhouapache, stolen from #7186. We are working on the same stuff ...
   ```suggestion
           super(TestAddConfigtoDeployVM, cls).tearDownClass()
           cls.reset_hosts_hugepages()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to