Muli Salem has posted comments on this change. Change subject: core: Vm Templates By Network Query ......................................................................
Patch Set 5: (3 inline comments) .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAO.java Line 64: */ Line 65: List<VmNetworkInterface> getAllForNetwork(Guid networkId); Line 66: Line 67: /** Line 68: * Retrieves the VmNetworkInterfaces that the given network is attached to, while referring to Done Line 69: * the VmTemplateIds Line 70: * Line 71: * @param networkId Line 72: * the network .................................................... File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAOTest.java Line 254: Line 255: @Test Line 256: public void testGetAllForTemplatesByNetwork() throws Exception { Line 257: List<VmNetworkInterface> result = dao.getAllForTemplatesByNetwork(FixturesTool.NETWORK_ENGINE); Line 258: assertEquals(existingVmInterface, result.get(0)); This test makes sure that only the expected interface was fetched, as well as that the right one was fetched. Line 259: } Line 260: Line 261: private void assertCorrectResultForTemplate(List<VmNetworkInterface> result) { Line 262: assertNotNull(result); .................................................... File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmTemplateDAOTest.java Line 265: */ Line 266: @Test Line 267: public void testGetAllForNetwork() { Line 268: List<VmTemplate> result = dao.getAllForNetwork(FixturesTool.NETWORK_ENGINE); Line 269: assertEquals(existingTemplate, result.get(0)); This way we make sure it is only the correct vm template. Line 270: } Line 271: Line 272: private static void assertGetResult(VmTemplate result) { Line 273: assertNotNull(result); -- To view, visit http://gerrit.ovirt.org/8707 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc4ac77abf598b6e1fff1fa4318b39c9f3af5453 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Muli Salem <msa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Muli Salem <msa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches