From 76563bbfcaafe7e81035d42c818ce2e6c0a52056 Mon Sep 17 00:00:00 2001 From: vijaysawant Date: Wed, 19 Jun 2024 10:14:52 +0530 Subject: [PATCH] client registration with capsule based on setting value, fixed error --- tests/foreman/cli/test_host.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/foreman/cli/test_host.py b/tests/foreman/cli/test_host.py index d68deace783..6d6b7ba43fe 100644 --- a/tests/foreman/cli/test_host.py +++ b/tests/foreman/cli/test_host.py @@ -2734,8 +2734,8 @@ def test_positive_host_registration_with_capsule( assert result.status == 0, f'Failed to register host: {result.stderr}' # Check output for "HTTP error code 422: Validation failed: Content view environment content facets is invalid" - assert "Validation failed" in str(result.stderr[1]), f"Error is: {result.stderr}" - assert "HTTP error code 422" in str(result.stderr[1]), f"Error is: {result.stderr}" + assert "Validation failed" in str(result.stderr), f"Error is: {result.stderr}" + assert "HTTP error code 422" in str(result.stderr), f"Error is: {result.stderr}" rhel_contenthost.unregister() # Re-register client with settings "validate_host_lce_content_source_coherence" is set to No @@ -2748,6 +2748,6 @@ def test_positive_host_registration_with_capsule( assert result.status == 0, f'Failed to register host: {result.stderr}' # Check output there should not any error like "Validation failed" or "HTTP error code 422" - assert "Validation failed" not in str(result.stderr[1]), f"Error is: {result.stderr}" - assert "HTTP error code 422" not in str(result.stderr[1]), f"Error is: {result.stderr}" + assert "Validation failed" not in str(result.stderr), f"Error is: {result.stderr}" + assert "HTTP error code 422" not in str(result.stderr), f"Error is: {result.stderr}" rhel_contenthost.unregister()