From 0a7b1099fdac692b236e97a2d7877db7e3967729 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 28 Feb 2024 06:17:09 +0100 Subject: [PATCH] fix: add one more string to detect unregistered insights-client status Add part of the error string shown by insights-client in case the underlying system is not registered with subscription-manager, and insights-client is not configured for BASIC authentication. Signed-off-by: Pino Toscano --- pytest_client_tools/insights_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_client_tools/insights_client.py b/pytest_client_tools/insights_client.py index a348ec2..d967408 100644 --- a/pytest_client_tools/insights_client.py +++ b/pytest_client_tools/insights_client.py @@ -149,7 +149,7 @@ def __init__(self): def is_registered(self): proc = self.run("--status", check=False) if proc.returncode in [0, 1] and any( - i in proc.stdout for i in ["NOT", "unregistered"] + i in proc.stdout for i in ["NOT", "unregistered", "401: Unauthorized"] ): return False if proc.returncode == 0 and any(