Tal Nisan has posted comments on this change.
Change subject: core: VM is down check when adding template
......................................................................
Patch Set 4: Looks good to me, approved
(2 inline comments)
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmTemplateCommandTest.java
Line 68: when(vdsGroupDao.get(vdsGroupId)).thenReturn(vdsGroup);
Line 69:
Line 70: AddVmTemplateParameters params = new
AddVmTemplateParameters(vm, "templateName", "Template for testing");
Line 71:
Line 72: // Using the compensation constructor since the normal one
contains DB access
Just a thought, maybe for another cleanup patch it'll be good to remove the DB
call in the parameter constructor
Line 73: cmd = spy(new
AddVmTemplateCommand<AddVmTemplateParameters>(params));
Line 74: AuditLogableBaseMockUtils.mockVmDao(cmd, vmDao);
Line 75: doReturn(vdsGroupDao).when(cmd).getVdsGroupDAO();
Line 76: cmd.setVmId(vmId);
Line 81: public void testCanDoAction() {
Line 82: doReturn(true).when(cmd).validateVmNotDuringSnapshot();
Line 83: vm.setStatus(VMStatus.Up);
Line 84:
Line 85: CanDoActionTestUtils.runAndAssertCanDoActionFailure(cmd,
VdcBllMessages.VMT_CANNOT_CREATE_TEMPLATE_FROM_DOWN_VM);
Not your fault but the message name is not correct, it should be
VMT_CANNOT_CREATE_TEMPLATE_FROM_NOT_DOWN_VM
Line 86: }
--
To view, visit http://gerrit.ovirt.org/11010
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifec2d9677765502ca6876b31835340d3c4fad5ae
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches