Merge "Fix the health monitor traffic test member ERROR"
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py b/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py
index 5b6d99b..c3610d5 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py
@@ -338,6 +338,7 @@
             const.ONLINE,
             CONF.load_balancer.build_interval,
             CONF.load_balancer.build_timeout,
+            error_ok=True,
             pool_id=self.pool_id)
         waiters.wait_for_status(
             self.mem_member_client.show_member,
diff --git a/octavia_tempest_plugin/tests/waiters.py b/octavia_tempest_plugin/tests/waiters.py
index 89e8455..eb7410a 100644
--- a/octavia_tempest_plugin/tests/waiters.py
+++ b/octavia_tempest_plugin/tests/waiters.py
@@ -28,7 +28,7 @@
 
 def wait_for_status(show_client, id, status_key, status,
                     check_interval, check_timeout, root_tag=None,
-                    **kwargs):
+                    error_ok=False, **kwargs):
     """Waits for an object to reach a specific status.
 
     :param show_client: The tempest service client show method.
@@ -40,6 +40,7 @@
     :check_interval: How often to check the status, in seconds.
     :check_timeout: The maximum time, in seconds, to check the status.
     :root_tag: The root tag on the response to remove, if any.
+    :error_ok: When true, ERROR status will not raise an exception.
     :raises CommandFailed: Raised if the object goes into ERROR and ERROR was
                            not the desired status.
     :raises TimeoutException: The object did not achieve the status or ERROR in
@@ -75,7 +76,8 @@
             if caller:
                 message = '({caller}) {message}'.format(caller=caller,
                                                         message=message)
-            raise exceptions.UnexpectedResponseCode(message)
+            if not error_ok:
+                raise exceptions.UnexpectedResponseCode(message)
         elif int(time.time()) - start >= check_timeout:
             message = (
                 '{name} {field} failed to update to {expected_status} within '