CLOUDSTACK-5166: Fixed test script issue related to egress

rules
This commit is contained in:
Ashutosh K 2013-11-15 11:14:44 +05:30 committed by Girish Shilamkar
parent bf22f6dfe9
commit 868e944bf1

View File

@ -523,7 +523,7 @@ class TestDefaultGroupEgress(cloudstackTestCase):
# CIDR: 0.0.0.0/0 # CIDR: 0.0.0.0/0
# 5. deployVirtualMachine into this security group (ssh) # 5. deployVirtualMachine into this security group (ssh)
# 6. deployed VM should be Running, ssh should be allowed into the VM, # 6. deployed VM should be Running, ssh should be allowed into the VM,
# ping out to google.com from the VM should fail, # ping out to google.com from the VM should be successful,
# ssh from within VM to mgt server should pass # ssh from within VM to mgt server should pass
security_group = SecurityGroup.create( security_group = SecurityGroup.create(
@ -617,7 +617,7 @@ class TestDefaultGroupEgress(cloudstackTestCase):
result = str(res) result = str(res)
self.assertEqual( self.assertEqual(
result.count("0 received"), result.count("1 received"),
1, 1,
"Ping to outside world from VM should be successful" "Ping to outside world from VM should be successful"
) )
@ -625,8 +625,8 @@ class TestDefaultGroupEgress(cloudstackTestCase):
try: try:
self.debug("SSHing into management server from VM") self.debug("SSHing into management server from VM")
res = ssh.execute("ssh %s@%s" % ( res = ssh.execute("ssh %s@%s" % (
self.services["mgmt_server"]["username"], self.apiclient.connection.user,
self.services["mgmt_server"]["ipaddress"] self.apiclient.connection.mgtSvr
)) ))
self.debug("SSH result: %s" % str(res)) self.debug("SSH result: %s" % str(res))
@ -725,7 +725,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
# 5. authorizeSecurityGroupEgress to allow ssh access only out to # 5. authorizeSecurityGroupEgress to allow ssh access only out to
# CIDR: 0.0.0.0/0 # CIDR: 0.0.0.0/0
# 6. deployed VM should be Running, ssh should be allowed into the VM, # 6. deployed VM should be Running, ssh should be allowed into the VM,
# ping out to google.com from the VM should fail # ping out to google.com from the VM should be successful
security_group = SecurityGroup.create( security_group = SecurityGroup.create(
self.apiclient, self.apiclient,
@ -819,7 +819,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
result = str(res) result = str(res)
self.assertEqual( self.assertEqual(
result.count("0 received"), result.count("1 received"),
1, 1,
"Ping to outside world from VM should be successful" "Ping to outside world from VM should be successful"
) )