Skip to content

Commit 778ccc1

Browse files
committed
Fix unit tests
1 parent 81c6f5a commit 778ccc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/storage/sharedfs/storagevm/src/test/java/org/apache/cloudstack/storage/sharedfs/lifecycle/StorageVmSharedFSLifeCycleTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.mockito.InjectMocks;
4747
import org.mockito.Mock;
4848
import org.mockito.MockedStatic;
49+
import org.mockito.Mockito;
4950
import org.mockito.MockitoAnnotations;
5051
import org.mockito.Spy;
5152
import org.mockito.junit.MockitoJUnitRunner;
@@ -236,7 +237,7 @@ private SharedFS prepareDeploySharedFS() throws ResourceUnavailableException, In
236237
when(serviceOfferingDao.findById(s_serviceOfferingId)).thenReturn(serviceOffering);
237238

238239
VMTemplateVO template = mock(VMTemplateVO.class);
239-
when(templateDao.findSystemVMReadyTemplate(s_zoneId, Hypervisor.HypervisorType.KVM, null)).thenReturn(template);
240+
when(templateDao.findSystemVMReadyTemplate(s_zoneId, Hypervisor.HypervisorType.KVM, ResourceManager.SystemVmPreferredArchitecture.defaultValue())).thenReturn(template);
240241
when(template.getId()).thenReturn(s_templateId);
241242

242243
return sharedFS;
@@ -298,7 +299,6 @@ public void testDeploySharedFSTemplateNotFound() throws ResourceUnavailableExcep
298299
when(dataCenterDao.findById(s_zoneId)).thenReturn(zone);
299300
when(resourceMgr.getSupportedHypervisorTypes(s_zoneId, false, null)).thenReturn(List.of(Hypervisor.HypervisorType.KVM));
300301

301-
when(templateDao.findSystemVMReadyTemplate(s_zoneId, Hypervisor.HypervisorType.KVM, null)).thenReturn(null);
302302
lifeCycle.deploySharedFS(sharedFS, s_networkId, s_diskOfferingId, s_size, s_minIops, s_maxIops);
303303
}
304304

0 commit comments

Comments
 (0)