Daniel Erez has posted comments on this change.

Change subject: core: extract PrepareSnapshotConfig method to ImagesHandler
......................................................................


Patch Set 6:

(2 comments)

http://gerrit.ovirt.org/#/c/27610/6/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveImageCommandTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveImageCommandTest.java:

Line 111:         when(snapshotDAO.get(vmSnapshotId)).thenReturn(snap);
Line 112:         doReturn(disk2).when(cmd).getDiskImage();
Line 113:         doReturn(disk2).when(cmd).getImage();
Line 114:         doReturn(disk2.getId()).when(cmd).getImageId();
Line 115:         Snapshot actual = 
ImagesHandler.prepareSnapshotConfigWithoutImageSingleImage(snap, 
disk2.getImageId());
> This test is irrelevant now, what do you test here exectly?
The test here seems more relevant to the command than ImagesHandler (and the 
context of this patch is merely extracting the method...).
Line 116:         String actualOvf = actual.getVmConfiguration();
Line 117: 
Line 118:         ArrayList<DiskImage> actualImages = new 
ArrayList<DiskImage>();
Line 119:         ovfManager.ImportVm(actualOvf, new VM(), actualImages, new 
ArrayList<VmNetworkInterface>());


Line 145:         when(snapshotDAO.get(vmSnapshotId)).thenReturn(snap);
Line 146:         doReturn(disk2).when(cmd).getDiskImage();
Line 147:         doReturn(disk2).when(cmd).getImage();
Line 148:         doReturn(disk2.getId()).when(cmd).getImageId();
Line 149:         Snapshot actual = 
ImagesHandler.prepareSnapshotConfigWithoutImageSingleImage(snap, 
disk2.getImageId());
> You should add this test to ImagesHandlerTest
same
Line 150:         String actualOvf = actual.getVmConfiguration();
Line 151: 
Line 152:         ArrayList<DiskImage> actualImages = new 
ArrayList<DiskImage>();
Line 153:         ovfManager.ImportVm(actualOvf, new VM(), actualImages, new 
ArrayList<VmNetworkInterface>());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c5e8d2763df3bcf18fb13a030148de352f57846
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to