mirror of https://github.com/apache/cloudstack.git
Fix unit test issue in non-oss build, temporarily disable dipendency of external network-elements like F5, NetScalar
This commit is contained in:
parent
4254cb85ce
commit
e7c34793fe
|
|
@ -590,6 +590,7 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<!--
|
||||
<profile>
|
||||
<id>netapp</id>
|
||||
<activation>
|
||||
|
|
@ -650,6 +651,7 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
-->
|
||||
<profile>
|
||||
<id>vmware</id>
|
||||
<activation>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.apache.cloudstack.api.command.admin.zone.AddVmwareDcCmd;
|
||||
import org.apache.cloudstack.api.command.admin.zone.RemoveVmwareDcCmd;
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
import org.apache.cloudstack.test.utils.SpringUtils;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
|
|
@ -89,7 +90,7 @@ import com.cloud.user.Account;
|
|||
import com.cloud.user.AccountManager;
|
||||
import com.cloud.user.AccountService;
|
||||
import com.cloud.user.AccountVO;
|
||||
import com.cloud.user.UserContext;
|
||||
import com.cloud.user.UserVO;
|
||||
import com.cloud.user.dao.AccountDao;
|
||||
import com.cloud.utils.component.ComponentContext;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
|
@ -175,7 +176,7 @@ public class VmwareDatacenterApiUnitTest {
|
|||
acct.setType(Account.ACCOUNT_TYPE_ADMIN);
|
||||
acct.setAccountName("admin");
|
||||
acct.setDomainId(domainId);
|
||||
UserContext.registerContext(1, acct, null, true);
|
||||
CallContext.register(new UserVO(1), new AccountVO(2L), null);
|
||||
|
||||
when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue