You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/02/13 04:28:47 UTC

[cloudstack] branch master updated: simulator: fix travis failure after merging volume destroy/recover (#3880)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new e5efb59  simulator: fix travis failure after merging volume destroy/recover  (#3880)
e5efb59 is described below

commit e5efb594143f610db3b811a1385e20e2a1ee978a
Author: Wei Zhou <w....@global.leaseweb.com>
AuthorDate: Thu Feb 13 05:28:31 2020 +0100

    simulator: fix travis failure after merging volume destroy/recover  (#3880)
    
    * test: do not associate public ip in test while deploy vm
    
    * simulator: remove template/volume only if it exist
    
    * simulator: fix build error
---
 .../main/java/com/cloud/agent/manager/MockStorageManagerImpl.java | 8 +-------
 test/integration/smoke/test_vm_life_cycle.py                      | 1 -
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/plugins/hypervisors/simulator/src/main/java/com/cloud/agent/manager/MockStorageManagerImpl.java b/plugins/hypervisors/simulator/src/main/java/com/cloud/agent/manager/MockStorageManagerImpl.java
index de12f3b..efa9510 100644
--- a/plugins/hypervisors/simulator/src/main/java/com/cloud/agent/manager/MockStorageManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/main/java/com/cloud/agent/manager/MockStorageManagerImpl.java
@@ -40,7 +40,6 @@ import org.apache.cloudstack.storage.command.DownloadProgressCommand;
 import org.apache.cloudstack.storage.command.UploadStatusAnswer;
 import org.apache.cloudstack.storage.command.UploadStatusAnswer.UploadStatus;
 import org.apache.cloudstack.storage.command.UploadStatusCommand;
-import org.apache.cloudstack.storage.to.VolumeObjectTO;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.AttachIsoCommand;
@@ -823,12 +822,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
         try {
             txn.start();
             MockVolumeVO template = _mockVolumeDao.findByStoragePathAndType(cmd.getData().getPath());
-            if (template == null) {
-                if(!((VolumeObjectTO)cmd.getData()).getName().startsWith("ROOT-")) {
-                    return new Answer(cmd, false, "can't find object to delete:" + cmd.getData()
-                                                                                      .getPath());
-                }
-            } else {
+            if (template != null) {
                 _mockVolumeDao.remove(template.getId());
             }
             txn.commit();
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 23aa161..3def053 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -803,7 +803,6 @@ class TestVMLifeCycle(cloudstackTestCase):
             accountid=self.account.name,
             domainid=self.account.domainid,
             serviceofferingid=self.small_offering.id,
-            mode=self.services["mode"]
         )
         vol1 = Volume.create(
             self.apiclient,