From ae5f40a7268522368df4284586c442dc50f904c0 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Thu, 2 Jan 2025 06:45:51 -0500 Subject: [PATCH] [6.15.z] [pre-commit.ci] pre-commit autoupdate (#17233) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [pre-commit.ci] pre-commit autoupdate (#17231) updates: - [github.com/gitleaks/gitleaks: v8.22.0 → v8.22.1](https://github.com/gitleaks/gitleaks/compare/v8.22.0...v8.22.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 1f7402b9e413db95f7cfc7067fb1ce41f26c027f) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- tests/foreman/cli/test_registration.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/foreman/cli/test_registration.py b/tests/foreman/cli/test_registration.py index 463e39e4d3..bc8ab4dd32 100644 --- a/tests/foreman/cli/test_registration.py +++ b/tests/foreman/cli/test_registration.py @@ -28,6 +28,7 @@ @pytest.mark.e2e @pytest.mark.no_containers +@pytest.mark.rhel_ver_match('8') def test_host_registration_end_to_end( module_sca_manifest_org, module_location, @@ -42,11 +43,14 @@ def test_host_registration_end_to_end( :steps: 1. Register host with global registration template to Satellite and Capsule + 2. Check the host is registered and verify host owner name - :expectedresults: Host registered successfully + :expectedresults: Host registered successfully with valid owner name :verifies: SAT-14716 + :BZ: 2156926, 2252768 + :customerscenario: true """ org = module_sca_manifest_org @@ -57,6 +61,14 @@ def test_host_registration_end_to_end( rc = 1 if rhel_contenthost.os_version.major == 6 else 0 assert result.status == rc, f'Failed to register host: {result.stderr}' + owner_name = module_target_sat.cli.Host.info( + options={'name': rhel_contenthost.hostname, 'fields': 'Additional info/owner'} + ) + # Verify host owner name set correctly + assert ( + 'Admin User' in owner_name['additional-info']['owner'] + ), f'Host owner name is incorrect: {owner_name["additional-info"]["owner"]}' + # Verify server.hostname and server.port from subscription-manager config assert module_target_sat.hostname == rhel_contenthost.subscription_config['server']['hostname'] assert rhel_contenthost.subscription_config['server']['port'] == CLIENT_PORT @@ -79,6 +91,14 @@ def test_host_registration_end_to_end( rc = 1 if rhel_contenthost.os_version.major == 6 else 0 assert result.status == rc, f'Failed to register host: {result.stderr}' + owner_name = module_target_sat.cli.Host.info( + options={'name': rhel_contenthost.hostname, 'fields': 'Additional info/owner'} + ) + # Verify capsule host owner name set correctly + assert 'Admin User' in owner_name['additional-info']['owner']['name'], ( + f'Host owner name is incorrect: ' f'{owner_name["additional-info"]["owner"]["name"]}' + ) + # Verify server.hostname and server.port from subscription-manager config assert ( module_capsule_configured.hostname