diff --git a/conf/repos.yaml.template b/conf/repos.yaml.template index 41b8acc4bc..4ec119343c 100644 --- a/conf/repos.yaml.template +++ b/conf/repos.yaml.template @@ -44,6 +44,7 @@ REPOS: RHEL7: replace-with-rhel7-http-link RHEL8: replace-with-rhel8-http-link RHEL9: replace-with-rhel9-http-link + RHEL10: replace-with-rhel10-http-link # Downstream Satellite-maintain repo SATMAINTENANCE_REPO: replace-with-sat-maintain-repo # Software Collection Repo diff --git a/pytest_fixtures/component/provision_pxe.py b/pytest_fixtures/component/provision_pxe.py index 9d744f7531..24065ab836 100644 --- a/pytest_fixtures/component/provision_pxe.py +++ b/pytest_fixtures/component/provision_pxe.py @@ -46,21 +46,21 @@ def module_provisioning_rhel_content( rh_repo_id = "" content_view = sat.api.ContentView(organization=module_sca_manifest_org).create() - if int(rhel_ver) < 10: - # Custom Content for Client repo - custom_product = sat.api.Product( - organization=module_sca_manifest_org, name=f'rhel{rhel_ver}_{gen_string("alpha")}' - ).create() - client_repo = sat.api.Repository( - organization=module_sca_manifest_org, - product=custom_product, - content_type='yum', - url=settings.repos.SATCLIENT_REPO[f'rhel{rhel_ver}'], - ).create() - task = client_repo.sync(synchronous=False) - tasks.append(task) - content_view.repository = [client_repo] + # Custom Content for Client repo + custom_product = sat.api.Product( + organization=module_sca_manifest_org, name=f'rhel{rhel_ver}_{gen_string("alpha")}' + ).create() + client_repo = sat.api.Repository( + organization=module_sca_manifest_org, + product=custom_product, + content_type='yum', + url=settings.repos.SATCLIENT_REPO[f'rhel{rhel_ver}'], + ).create() + task = client_repo.sync(synchronous=False) + tasks.append(task) + content_view.repository = [client_repo] + if int(rhel_ver) < 10: for name in repo_names: rh_kickstart_repo_id = sat.api_factory.enable_rhrepo_and_fetchid( basearch=constants.DEFAULT_ARCHITECTURE, @@ -147,14 +147,11 @@ def module_provisioning_rhel_content( ).create() # Ensure client repo is enabled in the activation key - if int(rhel_ver) < 10: - content = ak.product_content(data={'content_access_mode_all': '1'})['results'] - client_repo_label = [repo['label'] for repo in content if repo['name'] == client_repo.name][ - 0 - ] - ak.content_override( - data={'content_overrides': [{'content_label': client_repo_label, 'value': '1'}]} - ) + content = ak.product_content(data={'content_access_mode_all': '1'})['results'] + client_repo_label = [repo['label'] for repo in content if repo['name'] == client_repo.name][0] + ak.content_override( + data={'content_overrides': [{'content_label': client_repo_label, 'value': '1'}]} + ) return Box(os=os, ak=ak, ksrepo=ksrepo, cv=content_view) diff --git a/tests/foreman/api/test_provisioning.py b/tests/foreman/api/test_provisioning.py index dfb3836ad1..ab7b59c619 100644 --- a/tests/foreman/api/test_provisioning.py +++ b/tests/foreman/api/test_provisioning.py @@ -125,6 +125,9 @@ def test_rhel_pxe_provisioning( # Host should do call back to the Satellite reporting # the result of the installation. Wait until Satellite reports that the host is installed. + import time + + time.sleep(600) wait_for( lambda: host.read().build_status_label != 'Pending installation', timeout=1500,