Allon Mureinik has uploaded a new change for review.

Change subject: core: Fix test break in UpdateVmDisksCommandTest
......................................................................

core: Fix test break in UpdateVmDisksCommandTest

Fixed the test break caused by commit
b0e796daa33a5c2e693bc785c064b81dc7e9e79f.

Change-Id: Ifa0f74d5ebe8aa33b70ce9cb3772d8ce5c894cbb
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/26/15026/1

diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
index c41834e..34e67d7 100644
--- 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
@@ -27,11 +27,11 @@
 import org.ovirt.engine.core.common.action.UpdateVmDiskParameters;
 import org.ovirt.engine.core.common.businessentities.Disk;
 import org.ovirt.engine.core.common.businessentities.DiskImage;
+import org.ovirt.engine.core.common.businessentities.StoragePool;
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VM;
 import org.ovirt.engine.core.common.businessentities.VMStatus;
 import org.ovirt.engine.core.common.businessentities.VolumeFormat;
-import org.ovirt.engine.core.common.businessentities.StoragePool;
 import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.compat.Version;
@@ -171,7 +171,9 @@
         otherDisk.setId(Guid.NewGuid());
         otherDisk.setActive(true);
         otherDisk.setBoot(boot);
-        when(diskDao.getAllForVm(vmId)).thenReturn(new 
LinkedList<Disk>(Collections.singleton(otherDisk)));
+        if (boot) {
+            when(diskDao.getVmBootDisk(vmId)).thenReturn(otherDisk);
+        }
         when(diskDao.get(diskImageGuid)).thenReturn(createDiskImage());
         initializeCommand(parameters);
 
@@ -204,7 +206,9 @@
         otherDisk.setId(Guid.NewGuid());
         otherDisk.setActive(true);
         otherDisk.setBoot(boot);
-        when(diskDao.getAllForVm(otherVmId)).thenReturn(new 
LinkedList<Disk>(Collections.singleton(otherDisk)));
+        if (boot) {
+            when(diskDao.getVmBootDisk(otherVmId)).thenReturn(otherDisk);
+        }
         when(diskDao.get(diskImageGuid)).thenReturn(createDiskImage());
         initializeCommand(parameters);
 


--
To view, visit http://gerrit.ovirt.org/15026
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa0f74d5ebe8aa33b70ce9cb3772d8ce5c894cbb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to