Liron Aravot has posted comments on this change. Change subject: core: Preventing moving a shareable disk to a Gluster domain ......................................................................
Patch Set 7: (3 comments) http://gerrit.ovirt.org/#/c/35398/7/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommandTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommandTest.java: Line 95: initGlusterDestDomain(); Line 96: initShareableDiskImage(); Line 97: Line 98: // initVmForSpace(); Line 99: // initVmDiskImage(); please remove the comments Line 100: Line 101: Line 102: assertFalse(command.canDoAction()); Line 103: assertTrue(command.getReturnValue() Line 104: .getCanDoActionMessages() Line 105: .contains(VdcBllMessages.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS.toString())); Line 106: } Line 107: Line 108: private void initGlusterDestDomain() { we already have an initDestDomain method, let's just pass it the storage type. Line 109: StorageDomain destDomain = new StorageDomain(); Line 110: destDomain.setStorageType(StorageType.GLUSTERFS); Line 111: destDomain.setStatus(StorageDomainStatus.Active); Line 112: doReturn(destDomain).when(command).getStorageDomain(); Line 111: destDomain.setStatus(StorageDomainStatus.Active); Line 112: doReturn(destDomain).when(command).getStorageDomain(); Line 113: } Line 114: Line 115: private void initShareableDiskImage() { use the existing initVmDiskImage method and just set in this method later on the shareable flag. Line 116: DiskImage diskImage = new DiskImage(); Line 117: diskImage.setShareable(true); Line 118: when(diskImageDao.get(any(Guid.class))).thenReturn(diskImage); Line 119: } -- To view, visit http://gerrit.ovirt.org/35398 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I37e500e86d2b6094bb257221a4ca899590aed610 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Idan Shaby <ish...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches