From 83806eb9555be9065e119adf2524eb7147fb62e5 Mon Sep 17 00:00:00 2001 From: Vladimir Sedmik Date: Tue, 4 Jun 2024 20:32:07 +0200 Subject: [PATCH] Add a couple of fixes for PIT --- tests/foreman/api/test_errata.py | 2 +- tests/foreman/api/test_subscription.py | 5 ++++- tests/foreman/cli/test_contentaccess.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/foreman/api/test_errata.py b/tests/foreman/api/test_errata.py index 8fd717b44fd..3d0bd7b2f84 100644 --- a/tests/foreman/api/test_errata.py +++ b/tests/foreman/api/test_errata.py @@ -659,6 +659,7 @@ def test_positive_install_in_hc( @pytest.mark.rhel_ver_match('[^6]') @pytest.mark.no_containers @pytest.mark.e2e +@pytest.mark.pit_client def test_positive_install_multiple_in_host( target_sat, rhel_contenthost, module_org, activation_key, module_lce ): @@ -1377,7 +1378,6 @@ def errata_host_lce(module_sca_manifest_org, target_sat): @pytest.mark.tier3 @pytest.mark.upgrade -@pytest.mark.pit_client @pytest.mark.no_containers @pytest.mark.rhel_ver_match('8') def test_errata_installation_with_swidtags( diff --git a/tests/foreman/api/test_subscription.py b/tests/foreman/api/test_subscription.py index 9cc697aa556..769fdcb4bed 100644 --- a/tests/foreman/api/test_subscription.py +++ b/tests/foreman/api/test_subscription.py @@ -294,7 +294,10 @@ def test_sca_end_to_end( content_view.publish() assert len(content_view.repository) == 2 host = rhel_contenthost.nailgun_host - host.content_facet_attributes = {'content_view_id': content_view.id} + host.content_facet_attributes = { + 'content_view_id': content_view.id, + 'lifecycle_environment_id': module_ak.environment.id, + } host.update(['content_facet_attributes']) rhel_contenthost.run('subscription-manager repos --enable *') repos = rhel_contenthost.run('subscription-manager refresh && yum repolist') diff --git a/tests/foreman/cli/test_contentaccess.py b/tests/foreman/cli/test_contentaccess.py index bb50180d305..19bc73bbe69 100644 --- a/tests/foreman/cli/test_contentaccess.py +++ b/tests/foreman/cli/test_contentaccess.py @@ -92,7 +92,7 @@ def vm( ) host_id = host[0].id host_content = module_target_sat.api.Host(id=host_id).read_json() - assert host_content["subscription_status"] == 5 + assert host_content['subscription_facet_attributes']['uuid'] rhel7_contenthost_module.install_katello_host_tools() return rhel7_contenthost_module