diff --git a/pytest_fixtures/component/provisioning_template.py b/pytest_fixtures/component/provisioning_template.py index 0d2db56d21..eee5559d91 100644 --- a/pytest_fixtures/component/provisioning_template.py +++ b/pytest_fixtures/component/provisioning_template.py @@ -62,16 +62,13 @@ def module_sync_kickstart_content( This fixture sets up kickstart repositories for a specific RHEL version that is specified in `request.param`. """ + repo_names = [] tasks = [] rhel_ver = request.param['rhel_version'] - if rhel_ver <= 7: - repo_name = f'rhel{rhel_ver}' - # Using RHEL10 Beta repos until its GA - elif int(rhel_ver) == 10: - repo_name = f'rhel{rhel_ver}_bos_beta' + if int(rhel_ver) <= 7: + repo_names.append(f'rhel{rhel_ver}') else: - repo_name = f'rhel{rhel_ver}_bos' - repo_names = [repo_name] + repo_names.append(f'rhel{rhel_ver}_bos') for name in repo_names: rh_kickstart_repo_id = module_target_sat.api_factory.enable_rhrepo_and_fetchid( basearch=constants.DEFAULT_ARCHITECTURE, @@ -91,15 +88,11 @@ def module_sync_kickstart_content( ) task_status = module_target_sat.api.ForemanTask(id=task['id']).poll() assert task_status['result'] == 'success' - rhel_xy = Version( - constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos_beta']['version'] - if rhel_ver == 10 # TODO: Remove beta repos once RHEL10 is GA - else constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version'] + constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version'] if rhel_ver == 7 else constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version'] ) - o_systems = module_target_sat.api.OperatingSystem().search( query={'search': f'family=Redhat and major={rhel_xy.major} and minor={rhel_xy.minor}'} ) diff --git a/robottelo/constants/__init__.py b/robottelo/constants/__init__.py index 41b9efab57..4896fecec0 100644 --- a/robottelo/constants/__init__.py +++ b/robottelo/constants/__init__.py @@ -33,9 +33,8 @@ DISTRO_DEFAULT = 'rhel7' -DISTROS_SUPPORTED = ['rhel6', 'rhel7', 'rhel8', 'rhel9', 'rhel10'] +DISTROS_SUPPORTED = ['rhel7', 'rhel8', 'rhel9', 'rhel10'] DISTROS_MAJOR_VERSION = { - 'rhel6': 6, 'rhel7': 7, 'rhel8': 8, 'rhel9': 9, diff --git a/tests/foreman/api/test_capsulecontent.py b/tests/foreman/api/test_capsulecontent.py index 07a1b5be6b..dda6c26cbb 100644 --- a/tests/foreman/api/test_capsulecontent.py +++ b/tests/foreman/api/test_capsulecontent.py @@ -869,13 +869,13 @@ def test_positive_sync_kickstart_repo( cvv = cvv.read() assert len(cvv.environment) == 2 # Check for kickstart content on SAT and CAPS - tail = ( - f'rhel/server/7/{REPOS["kickstart"][distro]["version"]}/x86_64/kickstart' - if distro == 'rhel7' - else f'{distro.split("_")[0]}/{REPOS["kickstart"][distro]["version"]}/beta/x86_64/baseos/kickstart' - if 'beta' in distro # for future beta rhel distros - else f'{distro.split("_")[0]}/{REPOS["kickstart"][distro]["version"]}/x86_64/baseos/kickstart' # noqa:E501 - ) + tail = None + if distro == 'rhel7': + tail = f'rhel/server/7/{REPOS["kickstart"][distro]["version"]}/x86_64/kickstart' + elif 'beta' in distro: + tail = f'{distro.split("_")[0]}/{REPOS["kickstart"][distro]["version"]}/beta/x86_64/baseos/kickstart' + else: + tail = f'{distro.split("_")[0]}/{REPOS["kickstart"][distro]["version"]}/x86_64/baseos/kickstart' # noqa:E501 url_base = ( f'pulp/content/{function_sca_manifest_org.label}/{lce.label}/{cv.label}/' f'content/dist/{tail}'