Liron Aravot has posted comments on this change. Change subject: core: Fetch unregisterd entity from all the Storage Domains. ......................................................................
Patch Set 3: (3 comments) http://gerrit.ovirt.org/#/c/35886/3/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVMFromConfigurationCommandTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVMFromConfigurationCommandTest.java: Line 197: doReturn(storagePool).when(validator).getStoragePool(); Line 198: } Line 199: Line 200: private void initUnregisteredOVFData(OvfEntityData resultOvfEntityData) { Line 201: List<OvfEntityData> ovfEntityDataList = new ArrayList<>(); change to Collections.emptyList on rebase Line 202: if (resultOvfEntityData != null) { Line 203: ovfEntityDataList.add(resultOvfEntityData); Line 204: } Line 205: when(unregisteredOVFDataDao.getByEntityIdAndStorageDomain(vmId, storageDomainId)).thenReturn(ovfEntityDataList); http://gerrit.ovirt.org/#/c/35886/3/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/UnregisteredOVFDataDAOTest.java File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/UnregisteredOVFDataDAOTest.java: Line 102: dao.saveOVFData(ovfEntityData); Line 103: Line 104: List<OvfEntityData> fetchedOvfEntityData = Line 105: dao.getByEntityIdAndStorageDomain(FixturesTool.VM_TEMPLATE_RHEL5, FixturesTool.STORAGE_DOAMIN_NFS2_1); Line 106: assertFalse(fetchedOvfEntityData.isEmpty()); you expect one element, so you should assert that the size is 1 Line 107: assertTrue("The entity type should be template", fetchedOvfEntityData.get(0).getEntityType().isTemplateType()); Line 108: assertTrue("The entity OVF extra data should be updated", fetchedOvfEntityData.get(0).getOvfExtraData() Line 109: .equals(ovfExtraData)); Line 110: } Line 112: @Test Line 113: public void testDeleteUnregisteredEntity() { Line 114: List<OvfEntityData> ovfEntityDataList = Line 115: dao.getByEntityIdAndStorageDomain(FixturesTool.UNREGISTERED_VM, FixturesTool.STORAGE_DOAMIN_NFS2_1); Line 116: assertFalse(ovfEntityDataList.isEmpty()); same Line 117: dao.removeEntity(FixturesTool.UNREGISTERED_VM, FixturesTool.STORAGE_DOAMIN_NFS2_1); Line 118: List<OvfEntityData> ovfEntityDataList2 = Line 119: dao.getByEntityIdAndStorageDomain(FixturesTool.UNREGISTERED_VM, FixturesTool.STORAGE_DOAMIN_NFS2_1); Line 120: assertTrue(ovfEntityDataList2.isEmpty()); -- To view, visit http://gerrit.ovirt.org/35886 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia279818045ee3adfcda6383b010ac9f7e283886f Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@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