cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: refs/heads/scaleupvm - CLOUDSTACK-658 - Unit test modification
Date Mon, 18 Mar 2013 16:08:37 GMT
Updated Branches:
  refs/heads/scaleupvm bffc09c61 -> acbf262dc


CLOUDSTACK-658 - Unit test modification


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/acbf262d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/acbf262d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/acbf262d

Branch: refs/heads/scaleupvm
Commit: acbf262dc0958c6e7f465afc8e5faea9a969a49f
Parents: bffc09c
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Mon Mar 18 21:38:22 2013 +0530
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Mon Mar 18 21:38:22 2013 +0530

----------------------------------------------------------------------
 .../cloudstack/api/command/user/vm/ScaleVMCmd.java |    2 +-
 .../api/command/test/ScaleVMCmdTest.java           |    4 ++--
 server/test/com/cloud/vm/UserVmManagerTest.java    |   10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/acbf262d/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
index d47c508..4a1bb28 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/acbf262d/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
index 3cd4fd7..39275be 100644
--- a/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
+++ b/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
@@ -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);
 
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/acbf262d/server/test/com/cloud/vm/UserVmManagerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/UserVmManagerTest.java b/server/test/com/cloud/vm/UserVmManagerTest.java
index 6c0449a..bb1c07b 100755
--- a/server/test/com/cloud/vm/UserVmManagerTest.java
+++ b/server/test/com/cloud/vm/UserVmManagerTest.java
@@ -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;
-    }    */
+    }
 
 
 


Mime
View raw message