stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [4/4] stratos git commit: Update the add application method
Date Thu, 06 Aug 2015 05:27:49 GMT
Update the add application method


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5a0a5f60
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5a0a5f60
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5a0a5f60

Branch: refs/heads/tenant-isolation
Commit: 5a0a5f600065d345ba884f35e574b08702318375
Parents: 5add5dc
Author: Gayan Gunarathne <gayang@wso2.com>
Authored: Thu Aug 6 00:30:08 2015 +0530
Committer: Gayan Gunarathne <gayang@wso2.com>
Committed: Thu Aug 6 00:30:08 2015 +0530

----------------------------------------------------------------------
 .../rest/endpoint/api/StratosApiV41Utils.java   |  2 +-
 .../tests/SampleApplicationsTest.java           | 21 ++++++++++----------
 2 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5a0a5f60/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 056c41b..a183d26 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -1584,7 +1584,7 @@ public class StratosApiV41Utils {
         }
 
         if (!cartridgeGroups.contains(groupReferenceBean.getName())) {
-            cartridgeGroups.add(groupReferenceBean.getName());
+            cartridgeGroups.add(groupReferenceBean.getUuid());
         }
 
         if (groupReferenceBean.getGroups() != null) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/5a0a5f60/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
index 8f72d47..61bb287 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
@@ -32,6 +32,7 @@ import org.apache.stratos.common.beans.cartridge.CartridgeBean;
 import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
 import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
 import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
 import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
 import org.apache.stratos.common.client.AutoscalerServiceClient;
 import org.apache.stratos.common.threading.StratosThreadPool;
@@ -398,7 +399,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
             boolean addedC3 = cartridgeTest.addCartridge("c3.json", endpoint, restClient);
             assertEquals(addedC3, true);
 
-			/*
+
             boolean addedG1 = cartridgeGroupTest.addCartridgeGroup("cartrdige-nested.json",
                     endpoint, restClient);
             assertEquals(addedG1, true);
@@ -450,7 +451,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
             assertClusterActivation(bean.getApplicationId());
 
             //Updating application
-            boolean updated = applicationTest.updateApplication("g-sc-G123-1.json",
+          /*  boolean updated = applicationTest.updateApplication("g-sc-G123-1.json",
                     endpoint, restClient);
             assertEquals(updated, true);
 
@@ -464,7 +465,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
             assertEquals(removedGroup, false);
 
             boolean removedAuto = autoscalingPolicyTest.removeAutoscalingPolicy("autoscaling-policy-1",
endpoint,
-                    restClient);
+                    restClient,"admin","admin");
             assertEquals(removedAuto, false);
 
             boolean removedNet = networkPartitionTest.removeNetworkPartition("network-partition-1",
endpoint,
@@ -474,7 +475,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
 
             boolean removedDep = deploymentPolicyTest.removeDeploymentPolicy("deployment-policy-1",
endpoint,
                     restClient);
-            assertEquals(removedDep, false);
+            assertEquals(removedDep, false);   */
 
             boolean unDeployed = applicationTest.undeployApplication("g-sc-G123-1", endpoint,
                     restClient);
@@ -490,7 +491,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
                     restClient);
             assertEquals(beanRemoved, null);
 
-            removedGroup = cartridgeGroupTest.removeCartridgeGroup("G1", endpoint,
+            boolean removedGroup = cartridgeGroupTest.removeCartridgeGroup("G1", endpoint,
                     restClient);
             assertEquals(removedGroup, true);
 
@@ -506,16 +507,16 @@ public class SampleApplicationsTest extends StratosTestServerManager
{
                     restClient);
             assertEquals(removedC3, true);
 
-            removedAuto = autoscalingPolicyTest.removeAutoscalingPolicy("autoscaling-policy-1",
endpoint,
-                    restClient);
+            boolean removedAuto = autoscalingPolicyTest.removeAutoscalingPolicy("autoscaling-policy-1",
endpoint,
+                    restClient,"admin","admin");
             assertEquals(removedAuto, true);
 
-            removedDep = deploymentPolicyTest.removeDeploymentPolicy("deployment-policy-1",
endpoint,
+            boolean removedDep = deploymentPolicyTest.removeDeploymentPolicy("deployment-policy-1",
endpoint,
                     restClient);
             assertEquals(removedDep, true);
 
             //Remove network partition used by application policy
-            removedNet = networkPartitionTest.removeNetworkPartition("network-partition-1",
endpoint,
+            boolean removedNet = networkPartitionTest.removeNetworkPartition("network-partition-1",
endpoint,
                     restClient);
             assertEquals(removedNet, false);
 
@@ -534,7 +535,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
             removedN2 = networkPartitionTest.removeNetworkPartition("network-partition-2",
endpoint,
                     restClient);
             assertEquals(removedN2, true);
-*/
+
         } catch (Exception e) {
             log.error(e);
             assertTrue("An error occurred while handling autoscaling policy", false);


Mime
View raw message