summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--snaps/provisioning/tests/ansible_utils_tests.py10
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))