cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 85d073b
Date Fri, 31 Mar 2017 06:00:48 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 0f0d90829 -> 85d073b54


CLOUDSTACK-9854: Fix test_primary_storage test failure due to live migration


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11562dca
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11562dca
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11562dca

Branch: refs/heads/master
Commit: 11562dca7f25d8693dbc535b8dae9c83c0caf094
Parents: 0f0d908
Author: nvazquez <nicovazquez90@gmail.com>
Authored: Tue Mar 28 11:35:55 2017 -0300
Committer: nvazquez <nicovazquez90@gmail.com>
Committed: Thu Mar 30 15:50:51 2017 -0300

----------------------------------------------------------------------
 test/integration/smoke/test_primary_storage.py | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11562dca/test/integration/smoke/test_primary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py
index 8e236b6..ab67de0 100644
--- a/test/integration/smoke/test_primary_storage.py
+++ b/test/integration/smoke/test_primary_storage.py
@@ -306,7 +306,7 @@ class TestStorageTags(cloudstackTestCase):
                                          podid=cls.pod.id,
                                          tags=cls.services["storage_tags"]["a"]
             )
-            cls._cleanup.append(cls.storage_pool_1)
+            #PS not appended to _cleanup, it is removed on tearDownClass before cleaning
up resources
             assert cls.storage_pool_1.state == 'Up'
             storage_pools_response = list_storage_pools(cls.apiclient,
                                                         id=cls.storage_pool_1.id)
@@ -369,7 +369,18 @@ class TestStorageTags(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             # First expunge vm, so PS can be cleaned up
-            cls.virtual_machine_1.delete(cls.apiclient, expunge=True)
+            cls.virtual_machine_1.delete(cls.apiclient)
+
+            # Force delete primary storage
+            cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
+            cmd.id = cls.storage_pool_1.id
+            cls.apiclient.enableStorageMaintenance(cmd)
+            time.sleep(30)
+            cmd = deleteStoragePool.deleteStoragePoolCmd()
+            cmd.id = cls.storage_pool_1.id
+            cmd.forced = True
+            cls.apiclient.deleteStoragePool(cmd)
+            
             cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Cleanup failed with %s" % e)
@@ -539,6 +550,9 @@ class TestStorageTags(cloudstackTestCase):
         )
         vol = vm_1_volumes[0]
         
+        if self.hypervisor.lower() not in ["vmware", "xenserver"]:
+            self.virtual_machine_1.stop(self.apiclient)
+            
         # Check migration options for volume
         pools_response = StoragePool.listForMigration(
             self.apiclient,


Mime
View raw message