Merge "Remove ping check from basic scenario test"

This commit is contained in:
Jenkins 2015-04-24 15:15:14 +00:00 committed by Gerrit Code Review
commit 24d3471eab

View File

@ -86,7 +86,7 @@ class TestShareBasicOps(manager.ShareScenarioTest):
self.instance = self.create_server(image=self.image_ref, self.instance = self.create_server(image=self.image_ref,
create_kwargs=create_kwargs) create_kwargs=create_kwargs)
def verify_ssh(self): def init_ssh(self, do_ping=False):
# Obtain a floating IP # Obtain a floating IP
floating_ip = self.floating_ips_client.create_floating_ip() floating_ip = self.floating_ips_client.create_floating_ip()
self.addCleanup(self.delete_wrapper, self.addCleanup(self.delete_wrapper,
@ -101,6 +101,7 @@ class TestShareBasicOps(manager.ShareScenarioTest):
username=self.ssh_user, username=self.ssh_user,
private_key=self.keypair['private_key']) private_key=self.keypair['private_key'])
self.share = self.shares_client.get_share(self.share['id']) self.share = self.shares_client.get_share(self.share['id'])
if do_ping:
server_ip = self.share['export_location'].split(":")[0] server_ip = self.share['export_location'].split(":")[0]
self.ssh_client.exec_command("ping -c 1 %s" % server_ip) self.ssh_client.exec_command("ping -c 1 %s" % server_ip)
@ -147,7 +148,7 @@ class TestShareBasicOps(manager.ShareScenarioTest):
self.create_share(self.share_net['id']) self.create_share(self.share_net['id'])
self.boot_instance(self.net) self.boot_instance(self.net)
self.allow_access_ip(self.share['id'], instance=self.instance) self.allow_access_ip(self.share['id'], instance=self.instance)
self.verify_ssh() self.init_ssh()
for location in self.share['export_locations']: for location in self.share['export_locations']:
self.mount_share(location) self.mount_share(location)
self.umount_share() self.umount_share()