Merge "Matching test_check_vm_ip_dhcp on ip only"
authorSteven Pisarski <s.pisarski@cablelabs.com>
Tue, 2 May 2017 15:58:03 +0000 (15:58 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 2 May 2017 15:58:03 +0000 (15:58 +0000)
snaps/openstack/tests/create_instance_tests.py

index 9fe5fef..d8d69b3 100644 (file)
@@ -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: