Allon Mureinik has uploaded a new change for review. Change subject: core: Fix CreateAllSnapshotsFromVmCommandTest ......................................................................
core: Fix CreateAllSnapshotsFromVmCommandTest Fix test-break caused by commit 665c1c9e243eaa6ff16cbcdc88828b3645009f8a. The aforementioned patch moves the verification if a VM is (not) external from VmHandler to the VM entity itself, and was thus no longer mocked by the test, causing the failure. This patch adds such mocking, to allow the test to pass. Change-Id: I298d3bd0c05f3175371806dec60c7dccb798d165 Signed-off-by: Allon Mureinik <[email protected]> --- M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommandTest.java 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/02/18302/1 diff --git a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommandTest.java b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommandTest.java index ecc401a..b29b8ad 100644 --- a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommandTest.java +++ b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommandTest.java @@ -61,6 +61,7 @@ public void setUp() { CreateAllSnapshotsFromVmParameters params = new CreateAllSnapshotsFromVmParameters(Guid.newGuid(), ""); cmd = spy(new CreateAllSnapshotsFromVmCommand<CreateAllSnapshotsFromVmParameters>(params)); + doReturn(true).when(vm).isManagedVm(); doReturn(vm).when(cmd).getVm(); doReturn(vmValidator).when(cmd).createVmValidator(); doReturn(snapshotsValidator).when(cmd).createSnapshotValidator(); -- To view, visit http://gerrit.ovirt.org/18302 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I298d3bd0c05f3175371806dec60c7dccb798d165 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
