Mike Kolesnik has posted comments on this change.

Change subject: core: Permissions for GetAllDisksByVmIdQuery
......................................................................


Patch Set 13: (4 inline comments)

I think the test method is a bit lengthy, perhaps extract methods for mocking 
of certain stuff would help.

Other comments inline

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetAllDisksByVmIdQueryTest.java
Line 53:                 new VmDevice(new VmDeviceId(pluggedDisk.getId(), 
vmID), "disk", "disk", "", 1, "", true, true, true);
Why not use VmDeviceType.getName(VmDeviceType.DISK) ?

Line 70:                 "disk",
Why not use VmDeviceType.getName(VmDeviceType.DISK) ?

Additionally, you can use Mockito's argument matchers to match anythin that is 
not really important to check.

Line 71:                 "disk",
Same here..

Line 92:         assertTrue("unplugged disk should be in the return value", 
disks.contains(unpluggedDisk));
How can unplugged disk return? I didn't see that you mock it..

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6acf9149a82b38501d29526dd3efc5bd74a5d05f
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Livnat Peer <lp...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to