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.
This commit is contained in:
Prachi Damle 2013-11-07 21:22:03 -08:00
parent 1047a5398d
commit cb6d8d0190
1 changed files with 6 additions and 1 deletions

View File

@ -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);