diff options
author | 2017-07-11 13:26:43 +0000 | |
---|---|---|
committer | 2017-07-11 13:26:43 +0000 | |
commit | 5f3fe6856f07bd1289bac532264eccf6cba68d77 (patch) | |
tree | c4b27f52fce900be09055f63fa0c84eb6869c583 | |
parent | 7e241389c1f6f2366f7d8bef29eae938aefa4936 (diff) | |
parent | 2095e9a15958df573aac63b25e66cc5e3422c6ee (diff) |
Merge "Allow ssh when testing via ansible"
-rw-r--r-- | snaps/provisioning/tests/ansible_utils_tests.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/snaps/provisioning/tests/ansible_utils_tests.py b/snaps/provisioning/tests/ansible_utils_tests.py index 1cab8a6..4c8dea6 100644 --- a/snaps/provisioning/tests/ansible_utils_tests.py +++ b/snaps/provisioning/tests/ansible_utils_tests.py @@ -230,13 +230,13 @@ class AnsibleProvisioningTests(OSIntegrationTestCase): priv_ip = self.inst_creator.get_port_ip(self.port_1_name) self.assertTrue(check_dhcp_lease(self.nova, vm, priv_ip)) - # Block until VM's ssh port has been opened - self.assertTrue(self.inst_creator.vm_ssh_active(block=True)) - # Apply Security Group self.inst_creator.add_security_group( self.sec_grp_creator.get_security_group()) + # Block until VM's ssh port has been opened + self.assertTrue(self.inst_creator.vm_ssh_active(block=True)) + ssh_client = self.inst_creator.ssh_client() self.assertIsNotNone(ssh_client) out = ssh_client.exec_command('pwd')[1].channel.in_buffer.read(1024) @@ -282,6 +282,10 @@ class AnsibleProvisioningTests(OSIntegrationTestCase): priv_ip = self.inst_creator.get_port_ip(self.port_1_name) self.assertTrue(check_dhcp_lease(self.nova, vm, priv_ip)) + # Apply Security Group + self.inst_creator.add_security_group( + self.sec_grp_creator.get_security_group()) + # Block until VM's ssh port has been opened self.assertTrue(self.inst_creator.vm_ssh_active(block=True)) |