Skip to content

Commit 49df4c3

Browse files
CSTACKEX-18_2: junit fix
1 parent 0a1a9c4 commit 49df4c3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/vmsnapshot/OntapVMSnapshotStrategyTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,11 @@ void testCanHandle_AllocatedDiskType_AllVolumesOnOntap_ReturnsHighest() {
222222
void testCanHandle_AllocatedDiskAndMemoryType_ReturnsCantHandle() {
223223
VMSnapshotVO vmSnapshot = createMockVmSnapshot(VMSnapshot.State.Allocated, VMSnapshot.Type.DiskAndMemory);
224224
when(vmSnapshot.getVmId()).thenReturn(VM_ID);
225-
226-
StrategyPriority result = strategy.canHandle(vmSnapshot);
227-
228-
assertEquals(StrategyPriority.CANT_HANDLE, result);
225+
try{
226+
strategy.canHandle(vmSnapshot);
227+
} catch (CloudRuntimeException ex) {
228+
assertEquals(true, ex.getMessage().contains("Memory snapshots are not supported"));
229+
}
229230
}
230231

231232
@Test

0 commit comments

Comments
 (0)