You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/11/08 06:42:12 UTC
[2/2] git commit: updated refs/heads/master to cb6d8d0
CLOUDSTACK-5045 [Automation][BVT] Affinity group type is missing "create affinity group page" and failed to create Affinity group
Changes:
- Changes to Unit tests needed after this fix.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb6d8d01
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb6d8d01
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb6d8d01
Branch: refs/heads/master
Commit: cb6d8d01901c00134d63d4a39172128582d378fc
Parents: 1047a53
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Nov 7 21:22:03 2013 -0800
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Nov 7 21:40:39 2013 -0800
----------------------------------------------------------------------
.../org/apache/cloudstack/affinity/AffinityApiUnitTest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb6d8d01/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
index 97e093f..91d6958 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
@@ -63,6 +63,7 @@ import org.apache.cloudstack.test.utils.SpringUtils;
import com.cloud.dc.dao.DedicatedResourceDao;
import com.cloud.event.ActionEventUtils;
import com.cloud.dc.dao.DedicatedResourceDao;
+import com.cloud.deploy.DeploymentPlanner;
import com.cloud.domain.dao.DomainDao;
import com.cloud.event.ActionEventUtils;
import com.cloud.event.EventVO;
@@ -88,7 +89,7 @@ import com.cloud.vm.dao.UserVmDao;
public class AffinityApiUnitTest {
@Inject
- AffinityGroupService _affinityService;
+ AffinityGroupServiceImpl _affinityService;
@Inject
AccountManager _acctMgr;
@@ -144,6 +145,10 @@ public class AffinityApiUnitTest {
when(_processor.getType()).thenReturn("mock");
when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
+ List<AffinityGroupProcessor> affinityProcessors = new ArrayList<AffinityGroupProcessor>();
+ affinityProcessors.add(_processor);
+ _affinityService.setAffinityGroupProcessors(affinityProcessors);
+
AffinityGroupVO group = new AffinityGroupVO("group1", "mock", "mock group", domainId, 200L,
ControlledEntity.ACLType.Account);
Mockito.when(_affinityGroupDao.persist(Mockito.any(AffinityGroupVO.class))).thenReturn(group);