@@ -660,6 +660,7 @@ public void testCreateBackupLimitReached() throws ResourceAllocationException {
660
660
BackupOfferingVO offering = Mockito .mock (BackupOfferingVO .class );
661
661
when (backupOfferingDao .findById (backupOfferingId )).thenReturn (offering );
662
662
when (offering .isUserDrivenBackupAllowed ()).thenReturn (true );
663
+ when (offering .getProvider ()).thenReturn ("testbackupprovider" );
663
664
664
665
BackupScheduleVO schedule = mock (BackupScheduleVO .class );
665
666
when (schedule .getScheduleType ()).thenReturn (DateUtil .IntervalType .DAILY );
@@ -699,6 +700,7 @@ public void testCreateBackupStorageLimitReached() throws ResourceAllocationExcep
699
700
BackupOfferingVO offering = Mockito .mock (BackupOfferingVO .class );
700
701
when (backupOfferingDao .findById (backupOfferingId )).thenReturn (offering );
701
702
when (offering .isUserDrivenBackupAllowed ()).thenReturn (true );
703
+ when (offering .getProvider ()).thenReturn ("testbackupprovider" );
702
704
703
705
BackupScheduleVO schedule = mock (BackupScheduleVO .class );
704
706
when (schedule .getScheduleType ()).thenReturn (DateUtil .IntervalType .DAILY );
@@ -1122,6 +1124,7 @@ public void testRestoreBackupToVM() throws NoTransitionException {
1122
1124
1123
1125
BackupVO backup = mock (BackupVO .class );
1124
1126
when (backup .getBackupOfferingId ()).thenReturn (offeringId );
1127
+ when (backup .getStatus ()).thenReturn (Backup .Status .BackedUp );
1125
1128
1126
1129
VMInstanceVO vm = mock (VMInstanceVO .class );
1127
1130
when (vmInstanceDao .findByIdIncludingRemoved (vmId )).thenReturn (vm );
@@ -1177,6 +1180,7 @@ public void testRestoreBackupToVMException() throws NoTransitionException {
1177
1180
1178
1181
BackupVO backup = mock (BackupVO .class );
1179
1182
when (backup .getBackupOfferingId ()).thenReturn (offeringId );
1183
+ when (backup .getStatus ()).thenReturn (Backup .Status .BackedUp );
1180
1184
1181
1185
VMInstanceVO vm = mock (VMInstanceVO .class );
1182
1186
when (vmInstanceDao .findByIdIncludingRemoved (vmId )).thenReturn (vm );
0 commit comments