File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
server/src/test/java/org/apache/cloudstack/vm Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -420,6 +420,7 @@ public void importUnmanagedInstanceTest() {
420
420
ImportUnmanagedInstanceCmd importUnmanageInstanceCmd = Mockito .mock (ImportUnmanagedInstanceCmd .class );
421
421
when (importUnmanageInstanceCmd .getName ()).thenReturn ("TestInstance" );
422
422
when (importUnmanageInstanceCmd .getDomainId ()).thenReturn (null );
423
+ when (volumeApiService .doesTargetStorageSupportDiskOffering (any (StoragePool .class ), any ())).thenReturn (true );
423
424
try (MockedStatic <UsageEventUtils > ignored = Mockito .mockStatic (UsageEventUtils .class )) {
424
425
unmanagedVMsManager .importUnmanagedInstance (importUnmanageInstanceCmd );
425
426
}
@@ -767,11 +768,13 @@ public void testImportVmFromVmwareToKvmExistingVcenter() throws OperationTimedou
767
768
768
769
@ Test
769
770
public void testImportVmFromVmwareToKvmExistingVcenterSetConvertHost () throws OperationTimedoutException , AgentUnavailableException {
771
+ when (volumeApiService .doesTargetStorageSupportDiskOffering (any (StoragePool .class ), any ())).thenReturn (true );
770
772
baseTestImportVmFromVmwareToKvm (VcenterParameter .EXISTING , true , false );
771
773
}
772
774
773
775
@ Test
774
776
public void testImportVmFromVmwareToKvmExistingVcenterSetConvertHostAndTemporaryStorage () throws OperationTimedoutException , AgentUnavailableException {
777
+ when (volumeApiService .doesTargetStorageSupportDiskOffering (any (StoragePool .class ), any ())).thenReturn (true );
775
778
baseTestImportVmFromVmwareToKvm (VcenterParameter .EXISTING , true , true );
776
779
}
777
780
You can’t perform that action at this time.
0 commit comments