mirror of https://github.com/apache/cloudstack.git
server: fix unit test to fix build
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
5481485a08
commit
dd5fb2ebd6
|
|
@ -18,6 +18,7 @@ package com.cloud.user;
|
|||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
|
@ -40,6 +41,10 @@ import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
|||
import org.apache.cloudstack.framework.messagebus.MessageBus;
|
||||
import org.apache.cloudstack.region.gslb.GlobalLoadBalancerRuleDao;
|
||||
|
||||
import com.cloud.vm.snapshot.VMSnapshotManager;
|
||||
import com.cloud.vm.snapshot.VMSnapshotVO;
|
||||
import com.cloud.vm.snapshot.dao.VMSnapshotDao;
|
||||
|
||||
import com.cloud.configuration.ConfigurationManager;
|
||||
import com.cloud.configuration.dao.ResourceCountDao;
|
||||
import com.cloud.configuration.dao.ResourceLimitDao;
|
||||
|
|
@ -177,6 +182,11 @@ public class AccountManagerImplTest {
|
|||
@Mock
|
||||
MessageBus _messageBus;
|
||||
|
||||
@Mock
|
||||
VMSnapshotManager _vmSnapshotMgr;
|
||||
@Mock
|
||||
VMSnapshotDao _vmSnapshotDao;
|
||||
|
||||
@Mock
|
||||
User callingUser;
|
||||
@Mock
|
||||
|
|
@ -264,6 +274,7 @@ public class AccountManagerImplTest {
|
|||
securityChecker.checkAccess(Mockito.any(Account.class),
|
||||
Mockito.any(Domain.class)))
|
||||
.thenReturn(true);
|
||||
Mockito.when(_vmSnapshotDao.listByAccountId(Mockito.anyLong())).thenReturn(new ArrayList<VMSnapshotVO>());
|
||||
|
||||
Assert.assertTrue(accountManager.deleteUserAccount(42));
|
||||
// assert that this was a clean delete
|
||||
|
|
|
|||
Loading…
Reference in New Issue