You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ya...@apache.org on 2013/07/26 09:20:08 UTC
git commit: updated refs/heads/master to c576917
Updated Branches:
refs/heads/master 62c8df9dc -> c57691710
Automation: Fix endless silly test cases
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c5769171
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c5769171
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c5769171
Branch: refs/heads/master
Commit: c576917107789a938cee8cbdb41b18efc9f9dc78
Parents: 62c8df9
Author: Sheng Yang <sh...@citrix.com>
Authored: Fri Jul 26 00:07:02 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Fri Jul 26 00:20:01 2013 -0700
----------------------------------------------------------------------
.../component/test_vpc_vm_life_cycle.py | 67 ++++++++++----------
.../component/test_vpc_vms_deployment.py | 8 +--
2 files changed, 39 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5769171/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index 39fb533..ed86ae3 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -139,10 +139,10 @@ class Services:
"alg": "leastconn",
# Algorithm used for load balancing
"privateport": 22,
- "publicport": 2222,
+ "publicport": 22,
"openfirewall": False,
- "startport": 2222,
- "endport": 2222,
+ "startport": 22,
+ "endport": 22,
"protocol": "TCP",
"cidrlist": '0.0.0.0/0',
},
@@ -161,11 +161,11 @@ class Services:
# Any network (For creating FW rule)
"protocol": "TCP"
},
- "http_rule": {
- "startport": 80,
- "endport": 80,
- "cidrlist": '0.0.0.0/0',
- "protocol": "ICMP"
+ "icmp_rule": {
+ "icmptype": -1,
+ "icmpcode": -1,
+ "cidrlist": '0.0.0.0/0',
+ "protocol": "ICMP"
},
"virtual_machine": {
"displayname": "Test VM",
@@ -336,14 +336,14 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
cls.nwacl_internet_1 = NetworkACL.create(
cls.api_client,
networkid=cls.network_1.id,
- services=cls.services["http_rule"],
+ services=cls.services["icmp_rule"],
traffictype='Egress'
)
cls._cleanup = [
+ cls.account,
cls.service_offering,
cls.nw_off,
- cls.nw_off_no_lb,
- cls.account
+ cls.nw_off_no_lb
]
return
@@ -423,6 +423,8 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
def validate_network_rules(self):
"""Validates if the network rules work properly or not?"""
try:
+ self.debug("Checking if we can SSH into VM_1 through %s?" %
+ (self.public_ip_1.ipaddress.ipaddress))
ssh_1 = self.vm_1.get_ssh_client(
ipaddress=self.public_ip_1.ipaddress.ipaddress)
self.debug("SSH into VM is successfully")
@@ -446,7 +448,8 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
"Ping to outside world from VM should be successful"
)
- self.debug("Checking if we can SSH into VM_1?")
+ self.debug("Checking if we can SSH into VM_1 through %s?" %
+ (self.public_ip_2.ipaddress.ipaddress))
try:
ssh_2 = self.vm_1.get_ssh_client(
ipaddress=self.public_ip_2.ipaddress.ipaddress)
@@ -975,7 +978,6 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
networkofferingid=cls.shared_nw_off.id,
zoneid=cls.zone.id,
gateway='10.1.2.1',
- vpcid=cls.vpc.id
)
# Spawn an instance in that network
cls.vm_1 = VirtualMachine.create(
@@ -1062,15 +1064,15 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
cls.nwacl_internet_1 = NetworkACL.create(
cls.api_client,
networkid=cls.network_1.id,
- services=cls.services["http_rule"],
+ services=cls.services["icmp_rule"],
traffictype='Egress'
)
cls._cleanup = [
+ cls.account,
cls.service_offering,
cls.nw_off,
cls.shared_nw_off,
- cls.vpc_off,
- cls.account
+ cls.vpc_off
]
return
@@ -1774,11 +1776,11 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
vpcid=cls.vpc.id
)
cls._cleanup = [
+ cls.account,
cls.service_offering,
cls.nw_off,
cls.nw_off_no_lb,
- cls.vpc_off,
- cls.account
+ cls.vpc_off
]
return
@@ -1937,20 +1939,18 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
# Steps:
# 1. Deploy a VM using the default CentOS 6.2 Template
- self.debug("Finding the virtual router for network: %s" %
- self.network_1.name)
+ self.debug("Finding the virtual router for vpc: %s" % self.vpc.id)
+
routers = Router.list(
self.apiclient,
- account=self.account.name,
- domainid=self.account.domainid,
- networkid=self.network_1.id,
+ zoneid=self.zone.id,
listall=True
)
self.assertEqual(
isinstance(routers, list),
True,
- "List routers should return router for network: %s" %
- self.network_1.name
+ "List routers should return router for vpc: %s" %
+ self.vpc.id
)
router = routers[0]
@@ -1969,10 +1969,13 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
self.assertEqual(
isinstance(routers, list),
True,
- "List routers should return router for network: %s" %
- self.network_1.name
+ "List routers should return router for vpc: %s" %
+ self.vpc.id
)
router = routers[0]
+ self.debug("router.state %s" %
+ router.state)
+
self.assertEqual(
router.state,
"Stopped",
@@ -2004,7 +2007,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
"List vms shall return a valid resposnse"
)
vm_response = vms[0]
- self.assertEqaul(
+ self.assertEqual(
vm_response.state,
"Running",
"VM state should be running after deployment"
@@ -2182,14 +2185,14 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
cls.nwacl_internet = NetworkACL.create(
cls.api_client,
networkid=cls.network_1.id,
- services=cls.services["http_rule"],
+ services=cls.services["icmp_rule"],
traffictype='Egress'
)
cls._cleanup = [
+ cls.account,
cls.service_offering,
cls.nw_off,
- cls.nw_off_no_lb,
- cls.account
+ cls.nw_off_no_lb
]
return
@@ -2208,7 +2211,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
self.debug("Check the status of VPC virtual router")
routers = Router.list(
self.apiclient,
- networkid=self.network_1.id,
+ zoneid=self.zone.id,
listall=True
)
if not isinstance(routers, list):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5769171/test/integration/component/test_vpc_vms_deployment.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py
index a697fc3..818be21 100644
--- a/test/integration/component/test_vpc_vms_deployment.py
+++ b/test/integration/component/test_vpc_vms_deployment.py
@@ -2028,7 +2028,7 @@ class TestVMDeployVPC(cloudstackTestCase):
id=private_gateway.id,
listall=True
)
- self.assertEqaul(
+ self.assertEqual(
isinstance(gateways, list),
True,
"List private gateways should return a valid response"
@@ -2045,7 +2045,7 @@ class TestVMDeployVPC(cloudstackTestCase):
id=static_route.id,
listall=True
)
- self.assertEqaul(
+ self.assertEqual(
isinstance(static_routes, list),
True,
"List static route should return a valid response"
@@ -2199,7 +2199,7 @@ class TestVMDeployVPC(cloudstackTestCase):
id=private_gateway.id,
listall=True
)
- self.assertEqaul(
+ self.assertEqual(
isinstance(gateways, list),
True,
"List private gateways should return a valid response"
@@ -2216,7 +2216,7 @@ class TestVMDeployVPC(cloudstackTestCase):
id=static_route.id,
listall=True
)
- self.assertEqaul(
+ self.assertEqual(
isinstance(static_routes, list),
True,
"List static route should return a valid response"