mirror of https://github.com/apache/cloudstack.git
Removed unused unittests
This commit is contained in:
parent
2443a17b00
commit
619e753577
|
|
@ -1567,55 +1567,4 @@ public class VolumeApiServiceImplTest {
|
|||
Assert.assertFalse(volumeApiServiceImpl.isSendCommandForVmVolumeAttachDetach(host, Mockito.mock(StoragePoolVO.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVolumeOnDifferentScaleIOStorageInstance() {
|
||||
StoragePoolDetailVO srcPoolSystemIdDetail = Mockito.mock(StoragePoolDetailVO.class);
|
||||
String srcPoolSystemId = "610204d03e3ad60f";
|
||||
when(srcPoolSystemIdDetail.getValue()).thenReturn(srcPoolSystemId);
|
||||
|
||||
StoragePoolDetailVO destPoolSystemIdDetail = Mockito.mock(StoragePoolDetailVO.class);
|
||||
String destPoolSystemId = "7332760565f6340f";
|
||||
when(destPoolSystemIdDetail.getValue()).thenReturn(destPoolSystemId);
|
||||
|
||||
when(storagePoolDetailsDao.findDetail(1L,"powerflex.storagepool.system.id")).thenReturn(srcPoolSystemIdDetail);
|
||||
when(storagePoolDetailsDao.findDetail(2L,"powerflex.storagepool.system.id")).thenReturn(destPoolSystemIdDetail);
|
||||
|
||||
boolean result = volumeApiServiceImpl.isScaleIOVolumeOnDifferentScaleIOStorageInstances(1L, 2L);
|
||||
|
||||
Assert.assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVolumeOnSameScaleIOStorageInstance() {
|
||||
StoragePoolDetailVO srcPoolSystemIdDetail = Mockito.mock(StoragePoolDetailVO.class);
|
||||
String srcPoolSystemId = "610204d03e3ad60f";
|
||||
when(srcPoolSystemIdDetail.getValue()).thenReturn(srcPoolSystemId);
|
||||
|
||||
StoragePoolDetailVO destPoolSystemIdDetail = Mockito.mock(StoragePoolDetailVO.class);
|
||||
String destPoolSystemId = "610204d03e3ad60f";
|
||||
when(destPoolSystemIdDetail.getValue()).thenReturn(destPoolSystemId);
|
||||
|
||||
when(storagePoolDetailsDao.findDetail(1L,"powerflex.storagepool.system.id")).thenReturn(srcPoolSystemIdDetail);
|
||||
when(storagePoolDetailsDao.findDetail(2L,"powerflex.storagepool.system.id")).thenReturn(destPoolSystemIdDetail);
|
||||
|
||||
boolean result = volumeApiServiceImpl.isScaleIOVolumeOnDifferentScaleIOStorageInstances(1L, 2L);
|
||||
|
||||
Assert.assertFalse(result);
|
||||
}
|
||||
|
||||
@Test (expected = CloudRuntimeException.class)
|
||||
public void testCheckVolumeOnDifferentScaleIOStorageInstanceSystemIdShouldNotBeNull() {
|
||||
StoragePoolDetailVO srcPoolSystemIdDetail = Mockito.mock(StoragePoolDetailVO.class);
|
||||
String srcPoolSystemId = "610204d03e3ad60f";
|
||||
when(srcPoolSystemIdDetail.getValue()).thenReturn(srcPoolSystemId);
|
||||
|
||||
StoragePoolDetailVO destPoolSystemIdDetail = Mockito.mock(StoragePoolDetailVO.class);
|
||||
when(destPoolSystemIdDetail.getValue()).thenReturn(null);
|
||||
|
||||
when(storagePoolDetailsDao.findDetail(1L,"powerflex.storagepool.system.id")).thenReturn(srcPoolSystemIdDetail);
|
||||
when(storagePoolDetailsDao.findDetail(2L,"powerflex.storagepool.system.id")).thenReturn(destPoolSystemIdDetail);
|
||||
|
||||
volumeApiServiceImpl.isScaleIOVolumeOnDifferentScaleIOStorageInstances(1L, 2L);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue