diff options
author | Dan Radez <dradez@redhat.com> | 2017-05-02 10:06:23 -0400 |
---|---|---|
committer | Dan Radez <dradez@redhat.com> | 2017-05-02 11:15:58 -0400 |
commit | d3895af388091b03c9df070e5bebe524d08de8cd (patch) | |
tree | 9ad9525f1b6e73c8b87cedc5b296b2f3067fa6cd | |
parent | becbbabc63b0eff15ed6979947aeb75ddf6819c9 (diff) |
Matching test_check_vm_ip_dhcp on ip only
No nee dto look for the string surrounding the ip that's being looked
for in this test. simplifying the code to only look for the ip
Change-Id: I80e6336c58573e5970eafe2608daf7c61e43b717
Signed-off-by: Dan Radez <dradez@redhat.com>
-rw-r--r-- | snaps/openstack/tests/create_instance_tests.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/snaps/openstack/tests/create_instance_tests.py b/snaps/openstack/tests/create_instance_tests.py index 9fe5fef..d8d69b3 100644 --- a/snaps/openstack/tests/create_instance_tests.py +++ b/snaps/openstack/tests/create_instance_tests.py @@ -354,20 +354,15 @@ class SimpleHealthCheck(OSIntegrationTestCase): found = False timeout = 160 start_time = time.time() - match_value = 'Lease of.*obtained' - logger.info("Looking for expression %s in the console log" % match_value) + logger.info("Looking for IP %s in the console log" % ip) full_log = '' while timeout > time.time() - start_time: output = vm.get_console_output() full_log = full_log + output - if re.search(match_value, output): + if re.search(ip, output): logger.info('DHCP lease obtained logged in console') - if ip in output: - logger.info('With correct IP address') - found = True - else: - logger.error('With incorrect IP address') + found = True break if not found: |