You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/06/15 11:19:33 UTC

[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5105: server: set correct gateway when update vm nic on shared networks

weizhouapache commented on a change in pull request #5105:
URL: https://github.com/apache/cloudstack/pull/5105#discussion_r651692362



##########
File path: server/src/test/java/com/cloud/vm/UserVmManagerTest.java
##########
@@ -630,9 +631,9 @@ public void testUpdateVmNicIpSuccess2() throws Exception {
         when(vlan.getVlanNetmask()).thenReturn("255.255.255.0");
 
         when(_ipAddrMgr.allocatePublicIpForGuestNic(Mockito.eq(_networkMock), nullable(Long.class), Mockito.eq(_accountMock), anyString())).thenReturn("10.10.10.10");
-        lenient().when(_ipAddressDao.findByIpAndSourceNetworkId(anyLong(), anyString())).thenReturn(null);
+        when(_ipAddressDao.findByIpAndSourceNetworkId(anyLong(), eq("10.10.10.10"))).thenReturn(newIp);
+        when(_ipAddressDao.findByIpAndSourceNetworkId(anyLong(), eq("10.10.10.9"))).thenReturn(null);

Review comment:
       @borisstoyanov yes, it is hardcoded, but it is just an unit test.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org