cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/4.5 to dd5fb2e
Date Fri, 27 Feb 2015 13:48:31 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 5481485a0 -> dd5fb2ebd


server: fix unit test to fix build

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dd5fb2eb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dd5fb2eb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dd5fb2eb

Branch: refs/heads/4.5
Commit: dd5fb2ebd6904026e2ba0b3efcb6c382f860ffdd
Parents: 5481485
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Fri Feb 27 19:18:18 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri Feb 27 19:18:18 2015 +0530

----------------------------------------------------------------------
 server/test/com/cloud/user/AccountManagerImplTest.java | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd5fb2eb/server/test/com/cloud/user/AccountManagerImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/user/AccountManagerImplTest.java b/server/test/com/cloud/user/AccountManagerImplTest.java
index 5fff331..f70aa39 100644
--- a/server/test/com/cloud/user/AccountManagerImplTest.java
+++ b/server/test/com/cloud/user/AccountManagerImplTest.java
@@ -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;
@@ -178,6 +183,11 @@ public class AccountManagerImplTest {
     MessageBus _messageBus;
 
     @Mock
+    VMSnapshotManager _vmSnapshotMgr;
+    @Mock
+    VMSnapshotDao _vmSnapshotDao;
+
+    @Mock
     User callingUser;
     @Mock
     Account callingAccount;
@@ -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


Mime
View raw message