cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject [1/2] git commit: updated refs/heads/master to c0ed0b7
Date Sat, 22 Feb 2014 03:14:38 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master e2ec09472 -> c0ed0b781


CLOUDSTACK-6047: VR resource testing improvements


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

Branch: refs/heads/master
Commit: e5304d5e822f45bd62b097e608ebd89022ae0f44
Parents: e2ec094
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Thu Feb 20 18:09:28 2014 -0800
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Fri Feb 21 18:26:37 2014 -0800

----------------------------------------------------------------------
 .../VirtualRoutingResourceTest.java             | 25 ++++++++++++++------
 1 file changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5304d5e/core/test/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java
----------------------------------------------------------------------
diff --git a/core/test/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java
b/core/test/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java
index f961530..509eb8b 100644
--- a/core/test/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java
+++ b/core/test/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java
@@ -64,7 +64,9 @@ import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.test.context.support.AnnotationConfigContextLoader;
 
+import javax.naming.ConfigurationException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.UUID;
 
@@ -121,6 +123,11 @@ public class VirtualRoutingResourceTest implements VirtualRouterDeployer
{
     @Before
     public void setup() {
         _resource = new VirtualRoutingResource(this);
+        try {
+            _resource.configure("VRResource", new HashMap<String, Object>());
+        } catch (ConfigurationException e) {
+            e.printStackTrace();
+        }
     }
 
     protected void verifyCommand(NetworkElementCommand cmd, String script, String args) {
@@ -699,17 +706,17 @@ public class VirtualRoutingResourceTest implements VirtualRouterDeployer
{
 
         List<LoadBalancerTO> lbs = new ArrayList<>();
         List<LbDestination> dests = new ArrayList<>();
-        dests.add(new LbDestination(22, 80, "10.1.10.2", false));
-        dests.add(new LbDestination(22, 80, "10.1.10.2", true));
+        dests.add(new LbDestination(80, 8080, "10.1.10.2", false));
+        dests.add(new LbDestination(80, 8080, "10.1.10.2", true));
         lbs.add(new LoadBalancerTO(UUID.randomUUID().toString(), "64.10.1.10", 80, "tcp",
"algo", false, false, false, dests));
         LoadBalancerTO[] arrayLbs = new LoadBalancerTO[lbs.size()];
         lbs.toArray(arrayLbs);
         NicTO nic = new NicTO();
-        LoadBalancerConfigCommand cmd = new LoadBalancerConfigCommand(arrayLbs, "64.10.2.10",
"10.1.10.2", "192.168.1.2", nic, null, "1000", true);
+        LoadBalancerConfigCommand cmd = new LoadBalancerConfigCommand(arrayLbs, "64.10.2.10",
"10.1.10.2", "192.168.1.2", nic, null, "1000", false);
         Answer answer = _resource.executeRequest(cmd);
         assertTrue(answer.getResult());
 
-        cmd = new LoadBalancerConfigCommand(arrayLbs, "64.10.2.10", "10.1.10.2", "192.168.1.2",
nic, Long.valueOf(1), "1000", true);
+        cmd = new LoadBalancerConfigCommand(arrayLbs, "64.10.2.10", "10.1.10.2", "192.168.1.2",
nic, Long.valueOf(1), "1000", false);
         answer = _resource.executeRequest(cmd);
         assertTrue(answer.getResult());
     }
@@ -739,13 +746,15 @@ public class VirtualRoutingResourceTest implements VirtualRouterDeployer
{
                         "\toption  dontlognull\n" +
                         "\tretries 3\n" +
                         "\toption redispatch\n" +
-                        "\t#no option set here :<\n" +
-                        "\tno option forceclose\n" +
+                        "\toption forwardfor\n" +
+                        "\toption forceclose\n" +
                         "\ttimeout connect    5000\n" +
                         "\ttimeout client     50000\n" +
                         "\ttimeout server     50000\n" +
                         "\n" +
                         "listen stats_on_guest 10.1.10.2:8081\n" +
+                        "\tmode http\n" +
+                        "\toption httpclose\n" +
                         "\tstats enable\n" +
                         "\tstats uri     /admin?stats\n" +
                         "\tstats realm   Haproxy\\ Statistics\n" +
@@ -754,7 +763,9 @@ public class VirtualRoutingResourceTest implements VirtualRouterDeployer
{
                         "\t \n" +
                         "listen 64_10_1_10-80 64.10.1.10:80\n" +
                         "\tbalance algo\n" +
-                        "\tserver 64_10_1_10-80_0 10.1.10.2:22 check\n" +
+                        "\tserver 64_10_1_10-80_0 10.1.10.2:80 check\n" +
+                        "\tmode http\n" +
+                        "\toption httpclose\n" +
                         "\t \n" +
                         "\t \n");
                 break;


Mime
View raw message