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:07:14 UTC

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

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



##########
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:
       Sorry I hope I'm wrong here, but isn't this too specific, looks like hardcoded to me?




-- 
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