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/master to 3786aa0
Date Fri, 27 Feb 2015 13:49:15 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 43cf1da86 -> 3786aa0e6


server: fix unit test to fix build

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit dd5fb2ebd6904026e2ba0b3efcb6c382f860ffdd)
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/3786aa0e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3786aa0e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3786aa0e

Branch: refs/heads/master
Commit: 3786aa0e67c3ae0981699b8194ed4e90ca7494e1
Parents: 43cf1da
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:19:09 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/3786aa0e/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