Skip to content

Commit

Permalink
RHEL10 Clients coverage, rhel7 & 8 hosts bumped (#17003)
Browse files Browse the repository at this point in the history
* rhel10 parametrized fixture chosts

* Fixups, reverting some UI tests

* drop RHEL6 from supported distros
  • Loading branch information
damoore044 authored Feb 18, 2025
1 parent 74ad4b8 commit 1b41e14
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 97 deletions.
7 changes: 0 additions & 7 deletions pytest_fixtures/core/contenthosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ def rhel8_contenthost_module(request):
yield host


@pytest.fixture(params=[{'rhel_version': 6}])
def rhel6_contenthost(request):
"""A function-level fixture that provides a rhel6 content host object"""
with Broker(**host_conf(request), host_class=ContentHost) as host:
yield host


@pytest.fixture(params=[{'rhel_version': '9'}])
def rhel9_contenthost(request):
"""A fixture that provides a rhel9 content host object"""
Expand Down
4 changes: 2 additions & 2 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@


DISTRO_DEFAULT = 'rhel7'
DISTROS_SUPPORTED = ['rhel6', 'rhel7', 'rhel8', 'rhel9']
DISTROS_SUPPORTED = ['rhel7', 'rhel8', 'rhel9', 'rhel10']
DISTROS_MAJOR_VERSION = {
'rhel6': 6,
'rhel7': 7,
'rhel8': 8,
'rhel9': 9,
'rhel10': 10,
}
MAJOR_VERSION_DISTRO = {value: key for key, value in DISTROS_MAJOR_VERSION.items()}

Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/api/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def test_positive_ansible_job_on_multiple_host(
assert result.status_label == 'failed'

@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_match(r'^(?!.*fips).*$') # all major versions, excluding fips
def test_positive_ansible_localhost_job_on_host(
self, target_sat, module_org, module_location, module_ak_with_synced_repo, rhel_contenthost
):
Expand Down
20 changes: 10 additions & 10 deletions tests/foreman/api/test_capsulecontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def test_flatpak_pulpcore_endpoint(self, target_sat, module_capsule_configured):
@pytest.mark.e2e
@pytest.mark.tier4
@pytest.mark.skip_if_not_set('capsule')
@pytest.mark.parametrize('distro', ['rhel7', 'rhel8_bos', 'rhel9_bos'])
@pytest.mark.parametrize('distro', ['rhel7', 'rhel8_bos', 'rhel9_bos', 'rhel10_bos_beta'])
def test_positive_sync_kickstart_repo(
self, target_sat, module_capsule_configured, function_sca_manifest_org, distro
):
Expand Down Expand Up @@ -868,18 +868,18 @@ def test_positive_sync_kickstart_repo(
module_capsule_configured.wait_for_sync(start_time=timestamp)
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"]}/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}'
)

# Check kickstart specific files
for file in KICKSTART_CONTENT:
sat_file = target_sat.checksum_by_url(f'{target_sat.url}/{url_base}/{file}')
Expand Down Expand Up @@ -1447,13 +1447,13 @@ def test_positive_remove_capsule_orphans(
'repos_collection',
[
{
'distro': 'rhel9',
'distro': 'rhel10',
'YumRepository': {'url': settings.repos.yum_0.url},
}
],
indirect=True,
)
@pytest.mark.rhel_ver_list([settings.content_host.default_rhel_version])
@pytest.mark.rhel_ver_match('N-0')
def test_complete_sync_fixes_metadata(
self,
module_target_sat,
Expand Down
Loading

0 comments on commit 1b41e14

Please sign in to comment.