CLOUDSTACK-658 - Unit test modification

This commit is contained in:
Nitin Mehta 2013-03-18 21:38:22 +05:30
parent bffc09c61a
commit acbf262dc0
3 changed files with 8 additions and 8 deletions

View File

@ -81,7 +81,7 @@ public class ScaleVMCmd extends BaseCmd {
@Override
public void execute(){
UserContext.current().setEventDetails("Vm Id: "+getId());
//UserContext.current().setEventDetails("Vm Id: "+getId());
UserVm result = null;
try {
result = _userVmService.upgradeVirtualMachine(this);

View File

@ -66,8 +66,8 @@ public class ScaleVMCmdTest extends TestCase{
}
};
// Account account = new AccountVO("testaccount", 1L, "networkdomain", (short) 0, 1);
//UserContext.registerContext(1, account, null, true);
//Account account = new AccountVO("testaccount", 1L, "networkdomain", (short) 0, "uuid");
//UserContext.registerContext(1, account, null, true);
}

View File

@ -197,7 +197,7 @@ public class UserVmManagerTest {
_userVmMgr.restoreVMInternal(_account, _vmMock, 14L);
}
/*
// Test scaleVm on incompatible HV.
@Test(expected=InvalidParameterValueException.class)
public void testScaleVMF1() throws Exception {
@ -213,10 +213,10 @@ public class UserVmManagerTest {
serviceOfferingIdField.setAccessible(true);
serviceOfferingIdField.set(cmd, 1L);
//UserContext.current().setEventDetails("Vm Id: "+getId());
// Account account = (Account) new AccountVO("testaccount", 1L, "networkdomain", (short) 0, 1);
// UserContext.current().setEventDetails("Vm Id: "+getId());
Account account = (Account) new AccountVO("testaccount", 1L, "networkdomain", (short) 0, "uuid");
//AccountVO(String accountName, long domainId, String networkDomain, short type, int regionId)
// UserContext.registerContext(1, account, null, true);
UserContext.registerContext(1, account, null, true);
when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
@ -359,7 +359,7 @@ public class UserVmManagerTest {
ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, ha, displayText, useLocalStorage, false, null, false, null, false);
return serviceOffering;
} */
}