Moti Asayag has posted comments on this change.

Change subject: engine: Fix unit tests that were broken by multiple gateways
......................................................................


Patch Set 2: (2 inline comments)

please note that commit 663243e46549d3796fd50fa362520e0e20cf45b5 fixed the 
broken unit tests, but they can be slightly improved (e.g. by using the 
Version_3_3 instead of "3.3")

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelperTest.java
Line 172:         nic.setBootProtocol(NetworkBootProtocol.STATIC_IP);
Line 173:         nic.setGateway(RandomUtils.instance().nextString(10));
Line 174:         mockExistingIfaces(nic);
Line 175:         nic.setGateway(RandomUtils.instance().nextString(10));
Line 176: 
this seems the exact code as appears in 
  private SetupNetworksHelper createHelper(SetupNetworksParameters params)
Line 177:         VDS vds = mock(VDS.class);
Line 178:         when(vds.getId()).thenReturn(Guid.Empty);
Line 179:         
when(vds.getVdsGroupCompatibilityVersion()).thenReturn(Version.v3_3);
Line 180: 


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/SetupNetworksParametersTest.java
Line 30: 
Line 31:         Validator validator = ValidationUtils.getValidator();
Line 32: 
Line 33:         nic.setNetworkName("netName");
Line 34:         nic.setGateway("");
wouldn't you rather providing a value for the gateway to emphasis we support 
gateway for non management network in setupNetworks ?
Line 35:         nic.setBootProtocol(STATIC_IP);
Line 36:         nic.setAddress("1.1.1.1");
Line 37: 
Line 38:         assertTrue(validator.validate(params).isEmpty());


-- 
To view, visit http://gerrit.ovirt.org/15493
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1d453ea1efe736dd16dea9b793d784bee4225af8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to