Alona Kaplan has posted comments on this change.

Change subject: core: Tests for NetworkAttachmentsValidator
......................................................................


Patch Set 40:

(6 comments)

https://gerrit.ovirt.org/#/c/36147/40/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidator.java:

Line 68:     }
Line 69: 
Line 70:     //TODO MM: use MultiValueMapUtils
Line 71:     private List<NetworkType> getNetworkTypesList(Map<String, 
List<NetworkType>> nicNameToNetworkTypes, String nicName) {
Line 72:         //have to check since if null, multiple results would be 
merged producing invalid results.
please add space after the '//'
Line 73:         if (nicName == null) {
Line 74:             throw new IllegalArgumentException("nic name cannot be 
null");
Line 75:         }
Line 76: 


https://gerrit.ovirt.org/#/c/36147/40/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidatorTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidatorTest.java:

Line 79:     }
Line 80: 
Line 81:     @Test
Line 82:     public void 
testValidateNetworkExclusiveOnNicsAllAttachmentsMustHaveNicNameSet() throws 
Exception {
Line 83:         BusinessEntityMap<Network> networkMap =
why is it needed? The default one can be used.
Line 84:                 new BusinessEntityMap<>(Arrays.asList(vlanNetwork, 
vmNetwork1, nonVmNetwork1));
Line 85: 
Line 86:         NetworkAttachment networkAttachment = new NetworkAttachment();
Line 87:         networkAttachment.setNetworkId(vmNetwork1.getId());


Line 92:     }
Line 93: 
Line 94: 
Line 95:     @Test
Line 96:     public void 
testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface() throws 
Exception {
s/testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface/testValidateNetworkExclusiveOnNicsVmNetworkIsSoleAttachedInterface
Line 97:         checkVmNetworkIsSoleAssignedInterface(isValid(), vmNetwork1);
Line 98:     }
Line 99: 
Line 100:     @Test


Line 97:         checkVmNetworkIsSoleAssignedInterface(isValid(), vmNetwork1);
Line 98:     }
Line 99: 
Line 100:     @Test
Line 101:     public void 
testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface1() 
throws Exception {
testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface1/testValidateNetworkExclusiveOnNicsTwoVmNetworksAttachedToInterface
Line 102:         checkVmNetworkIsSoleAssignedInterface(
Line 103:                 
failsWith(VdcBllMessages.NETWORK_INTERFACES_NOT_EXCLUSIVELY_USED_BY_NETWORK),
Line 104:                 vmNetwork1, vmNetwork2);
Line 105:     }


Line 104:                 vmNetwork1, vmNetwork2);
Line 105:     }
Line 106: 
Line 107:     @Test
Line 108:     public void 
testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface2() 
throws Exception {
s/testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface2/testValidateNetworkExclusiveOnNicsVmAndNonVmAttachedToInterface
Line 109:         checkVmNetworkIsSoleAssignedInterface(
Line 110:                 
failsWith(VdcBllMessages.NETWORK_INTERFACES_NOT_EXCLUSIVELY_USED_BY_NETWORK),
Line 111:                 vmNetwork1, nonVmNetwork1);
Line 112:     }


Line 111:                 vmNetwork1, nonVmNetwork1);
Line 112:     }
Line 113: 
Line 114:     @Test
Line 115:     public void 
testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface3() 
throws Exception {
s/testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface3/testValidateNetworkExclusiveOnNicsVmAndVlanAttachedToInterface
Line 116:         checkVmNetworkIsSoleAssignedInterface(
Line 117:                 
failsWith(VdcBllMessages.NETWORK_INTERFACES_NOT_EXCLUSIVELY_USED_BY_NETWORK),
Line 118:                 vmNetwork1, vlanNetwork);
Line 119:     }


-- 
To view, visit https://gerrit.ovirt.org/36147
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I534a0a200f9a5b7d9faadba766699112b9c6a5b8
Gerrit-PatchSet: 40
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to