mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5168: Fixed test script issue related to SSH
command
This commit is contained in:
parent
868e944bf1
commit
b178d06454
@ -907,7 +907,7 @@ class TestRevokeEgressRule(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
|
||||||
# 7. Revoke egress rule. Verify ping and SSH access to management server
|
# 7. Revoke egress rule. Verify ping and SSH access to management server
|
||||||
# is restored
|
# is restored
|
||||||
@ -1005,7 +1005,7 @@ class TestRevokeEgressRule(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"
|
||||||
)
|
)
|
||||||
@ -1014,7 +1014,7 @@ class TestRevokeEgressRule(cloudstackTestCase):
|
|||||||
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.services["mgmt_server"]["username"],
|
||||||
self.services["mgmt_server"]["ipaddress"]
|
self.apiclient.connection.mgtSvr
|
||||||
))
|
))
|
||||||
self.debug("SSH result: %s" % str(res))
|
self.debug("SSH result: %s" % str(res))
|
||||||
|
|
||||||
@ -1062,16 +1062,16 @@ class TestRevokeEgressRule(cloudstackTestCase):
|
|||||||
|
|
||||||
result = str(res)
|
result = str(res)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
result.count("1 received"),
|
result.count("0 received"),
|
||||||
1,
|
1,
|
||||||
"Ping to outside world from VM should be successful"
|
"Ping to outside world from VM should fail"
|
||||||
)
|
)
|
||||||
|
|
||||||
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.services["mgmt_server"]["username"],
|
||||||
self.services["mgmt_server"]["ipaddress"]
|
self.apiclient.connection.mgtSvr
|
||||||
))
|
))
|
||||||
self.debug("SSH result: %s" % str(res))
|
self.debug("SSH result: %s" % str(res))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user