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() {
420420 ImportUnmanagedInstanceCmd importUnmanageInstanceCmd = Mockito .mock (ImportUnmanagedInstanceCmd .class );
421421 when (importUnmanageInstanceCmd .getName ()).thenReturn ("TestInstance" );
422422 when (importUnmanageInstanceCmd .getDomainId ()).thenReturn (null );
423+ when (volumeApiService .doesTargetStorageSupportDiskOffering (any (StoragePool .class ), any ())).thenReturn (true );
423424 try (MockedStatic <UsageEventUtils > ignored = Mockito .mockStatic (UsageEventUtils .class )) {
424425 unmanagedVMsManager .importUnmanagedInstance (importUnmanageInstanceCmd );
425426 }
@@ -767,11 +768,13 @@ public void testImportVmFromVmwareToKvmExistingVcenter() throws OperationTimedou
767768
768769 @ Test
769770 public void testImportVmFromVmwareToKvmExistingVcenterSetConvertHost () throws OperationTimedoutException , AgentUnavailableException {
771+ when (volumeApiService .doesTargetStorageSupportDiskOffering (any (StoragePool .class ), any ())).thenReturn (true );
770772 baseTestImportVmFromVmwareToKvm (VcenterParameter .EXISTING , true , false );
771773 }
772774
773775 @ Test
774776 public void testImportVmFromVmwareToKvmExistingVcenterSetConvertHostAndTemporaryStorage () throws OperationTimedoutException , AgentUnavailableException {
777+ when (volumeApiService .doesTargetStorageSupportDiskOffering (any (StoragePool .class ), any ())).thenReturn (true );
775778 baseTestImportVmFromVmwareToKvm (VcenterParameter .EXISTING , true , true );
776779 }
777780
You can’t perform that action at this time.
0 commit comments