File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
server/src/test/java/com/cloud/user Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 6868import com .cloud .utils .db .SearchCriteria ;
6969import com .cloud .utils .exception .CloudRuntimeException ;
7070import com .cloud .utils .net .NetUtils ;
71+ import com .cloud .vm .dao .VMInstanceDao ;
7172
7273
7374@ RunWith (MockitoJUnitRunner .class )
@@ -123,6 +124,8 @@ public class DomainManagerImplTest {
123124 Account adminAccount ;
124125 @ Mock
125126 GlobalLock lock ;
127+ @ Mock
128+ VMInstanceDao vmInstanceDao ;
126129
127130 List <AccountVO > domainAccountsForCleanup ;
128131 List <Long > domainNetworkIds ;
@@ -309,7 +312,7 @@ public void deleteDomainCleanup() {
309312 Mockito .when (_resourceCountDao .removeEntriesByOwner (Mockito .anyLong (), Mockito .eq (ResourceOwnerType .Domain ))).thenReturn (1l );
310313 Mockito .when (_resourceLimitDao .removeEntriesByOwner (Mockito .anyLong (), Mockito .eq (ResourceOwnerType .Domain ))).thenReturn (1l );
311314 Mockito .when (_configMgr .releaseDomainSpecificVirtualRanges (Mockito .any ())).thenReturn (true );
312-
315+ Mockito . when ( vmInstanceDao . listDeleteProtectedVmsByDomainIds ( Mockito . any ())). thenReturn ( Collections . emptyList ());
313316 try {
314317 Assert .assertTrue (domainManager .deleteDomain (20l , true ));
315318 } finally {
You can’t perform that action at this time.
0 commit comments