mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
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
This commit is contained in:
parent
d46f428757
commit
e5efb59414
@ -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();
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user