GabrielBrascher commented on a change in pull request #4548:
URL: https://github.com/apache/cloudstack/pull/4548#discussion_r545097697



##########
File path: 
server/src/test/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImplTest.java
##########
@@ -368,6 +358,12 @@ public void importUnmanagedInstanceTest() {
         when(importUnmanageInstanceCmd.getName()).thenReturn("TestInstance");
         when(importUnmanageInstanceCmd.getAccountName()).thenReturn(null);
         when(importUnmanageInstanceCmd.getDomainId()).thenReturn(null);
+        Map<String,Long> diskOfferings = new HashMap();
+        getDisks().forEach((disk) -> {
+            diskOfferings.put(disk.getDiskId(), 43L);
+        });
+        diskOfferings.remove("WrongRootDisk");
+        
when(importUnmanageInstanceCmd.getDataDiskToDiskOfferingList()).thenReturn(diskOfferings);

Review comment:
       Got it, makes sense then.
   I am just too used with the _Assert_ mentality on JUnit Tests; but it looks 
good then.




----------------------------------------------------------------
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:
[email protected]


Reply via email to