Skip to content

Commit 5129b00

Browse files
committed
fix test failure
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 2c08c76 commit 5129b00

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,7 +3593,6 @@ public void testAllocateVMFromBackupUsingBackupValuesWithISO() throws Insufficie
35933593
@Test
35943594
public void testRestoreVMFromBackup() throws ResourceUnavailableException, InsufficientCapacityException, ResourceAllocationException {
35953595
Long backupId = 5L;
3596-
Long templateId = 6L;
35973596

35983597
CreateVMFromBackupCmd cmd = mock(CreateVMFromBackupCmd.class);
35993598
when(cmd.getBackupId()).thenReturn(backupId);
@@ -3603,7 +3602,6 @@ public void testRestoreVMFromBackup() throws ResourceUnavailableException, Insuf
36033602
UserVmVO vm = mock(UserVmVO.class);
36043603
when(vm.getId()).thenReturn(vmId);
36053604
when(vm.getState()).thenReturn(VirtualMachine.State.Running);
3606-
when(vm.getTemplateId()).thenReturn(templateId);
36073605

36083606
when(backupManager.restoreBackupToVM(backupId, vmId)).thenReturn(true);
36093607

@@ -3612,7 +3610,6 @@ public void testRestoreVMFromBackup() throws ResourceUnavailableException, Insuf
36123610
doReturn(vmPair).when(userVmManagerImpl).startVirtualMachine(anyLong(), isNull(), isNull(), isNull(), anyMap(), isNull());
36133611
doReturn(vmPair).when(userVmManagerImpl).startVirtualMachine(anyLong(), isNull(), isNull(), anyLong(), anyMap(), isNull());
36143612
when(userVmDao.findById(vmId)).thenReturn(vm);
3615-
when(templateDao.findByIdIncludingRemoved(templateId)).thenReturn(mock(VMTemplateVO.class));
36163613

36173614
UserVm result = userVmManagerImpl.restoreVMFromBackup(cmd);
36183615

0 commit comments

Comments
 (0)