Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/supportability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ supportability:
content_hosts:
default_os_name: "RedHat"
rhel:
versions: [7,'7_fips', 8, '8_fips', 9, '9_fips']
versions: [6, 7, '7_fips', 8, '8_fips', 9, '9_fips']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Clarify whether a RHEL 6 FIPS variant should be represented in the support matrix

You added 6 but not '6_fips', whereas 7–9 all include FIPS variants. If RHEL 6 FIPS is supported, please add '6_fips' for consistency; if it’s explicitly unsupported, this asymmetry is fine but should be intentional.

2 changes: 1 addition & 1 deletion pytest_fixtures/component/provision_capsule_pxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def capsule_provisioning_rhel_content(
assert task_status['result'] == 'success'
rhel_xy = Version(
constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version']
if rhel_ver == 7
if rhel_ver <= 7
else constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version']
)
o_systems = sat.api.OperatingSystem().search(
Expand Down
2 changes: 1 addition & 1 deletion pytest_fixtures/component/provision_pxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def module_provisioning_rhel_content(
assert task_status['result'] == 'success'
rhel_xy = Version(
constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version']
if rhel_ver == 7
if rhel_ver <= 7
else constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version']
)
o_systems = sat.api.OperatingSystem().search(
Expand Down
2 changes: 1 addition & 1 deletion pytest_fixtures/component/provisioning_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def module_sync_kickstart_content(
assert task_status['result'] == 'success'
rhel_xy = Version(
constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version']
if rhel_ver == 7
if rhel_ver <= 7
else constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version']
)
o_systems = module_target_sat.api.OperatingSystem().search(
Expand Down
10 changes: 10 additions & 0 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
'rhsc8': 'Red Hat Satellite Capsule 6.16 for RHEL 8 x86_64 (RPMs)',
'rhsc9': 'Red Hat Satellite Capsule 6.16 for RHEL 9 x86_64 (RPMs)',
'rhsc7_iso': 'Red Hat Satellite Capsule 6.4 (for RHEL 7 Server) (ISOs)',
'rhsclient6': 'Red Hat Satellite Client 6 (for RHEL 6 Server - ELS) (RPMs)',
'rhsclient7': 'Red Hat Satellite Client 6 (for RHEL 7 Server) (RPMs)',
'rhsclient8': 'Red Hat Satellite Client 6 for RHEL 8 x86_64 (RPMs)',
'rhsclient9': 'Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs)',
Expand Down Expand Up @@ -433,6 +434,15 @@
'id': 'rhel-7-server-satellite-capsule-6.4-isos',
'name': ('Red Hat Satellite Capsule 6.4 for RHEL 7 Server ISOs x86_64'),
},
'rhsclient6': {
'id': 'rhel-6-server-els-satellite-client-6-rpms',
'name': ('Red Hat Satellite Client 6 for RHEL 6 Server - ELS RPMs x86_64'),
'version': '6',
'reposet': REPOSET['rhsclient6'],
'product': PRDS['rhel_els'],
'distro': 'rhel6',
'key': PRODUCT_KEY_SAT_CLIENT,
},
'rhsclient7': {
'id': 'rhel-7-server-satellite-client-6-rpms',
'name': ('Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64'),
Expand Down
33 changes: 21 additions & 12 deletions tests/foreman/api/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class TestAnsibleREX:
@pytest.mark.e2e
@pytest.mark.pit_client
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('[^6].*')
@pytest.mark.rhel_ver_match('[^6]')
def test_positive_ansible_job_on_host(
self, target_sat, module_org, module_location, module_ak_with_synced_repo, rhel_contenthost
):
Expand All @@ -357,13 +357,16 @@ def test_positive_ansible_job_on_host(
:BZ: 2164400
"""
SELECTED_ROLE = 'RedHatInsights.insights-client'
if rhel_contenthost.os_version.major <= 7:
rhel_contenthost.create_custom_repos(rhel7=settings.repos.rhel7_os)
rhelver = rhel_contenthost.os_version.major
if rhelver <= 7:
rhel_contenthost.create_custom_repos(**settings.repos[f'rhel{rhelver}_os'])
assert rhel_contenthost.execute('yum install -y insights-client').status == 0
result = rhel_contenthost.register(
module_org, module_location, module_ak_with_synced_repo.name, target_sat
)
assert result.status == 0, f'Failed to register host: {result.stderr}'
if rhelver != 6:
assert result.status == 0, f'Failed to register host: {result.stderr}'
assert rhel_contenthost.subscribed
proxy_id = target_sat.nailgun_smart_proxy.id
target_host = rhel_contenthost.nailgun_host
target_sat.api.AnsibleRoles().sync(
Expand Down Expand Up @@ -437,7 +440,9 @@ def test_positive_ansible_job_on_multiple_host(
result = host.register(
module_org, module_location, module_ak_with_synced_repo.name, target_sat
)
assert result.status == 0, f'Failed to register host: {result.stderr}'
if host.os_version.major != 6:
assert result.status == 0, f'Failed to register host: {result.stderr}'
assert host.subscribed
proxy_id = target_sat.nailgun_smart_proxy.id
target_host = host.nailgun_host
target_sat.api.AnsibleRoles().sync(
Expand Down Expand Up @@ -479,7 +484,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_list(r'^[\d]+$')
def test_positive_ansible_localhost_job_on_host(
self, target_sat, module_org, module_location, module_ak_with_synced_repo, rhel_contenthost
):
Expand Down Expand Up @@ -512,8 +517,9 @@ def test_positive_ansible_localhost_job_on_host(
result = rhel_contenthost.register(
module_org, module_location, module_ak_with_synced_repo.name, target_sat
)
assert result.status == 0, f'Failed to register host: {result.stderr}'

if rhel_contenthost.os_version.major != 6:
assert result.status == 0, f'Failed to register host: {result.stderr}'
assert rhel_contenthost.subscribed
template_id = (
target_sat.api.JobTemplate()
.search(query={'search': 'name="Ansible - Run playbook"'})[0]
Expand Down Expand Up @@ -541,7 +547,7 @@ def test_positive_ansible_localhost_job_on_host(
assert [i['output'] for i in result if i['output'] == 'Exit status: 0']

@pytest.mark.no_containers
@pytest.mark.rhel_ver_list('8')
@pytest.mark.rhel_ver_list([settings.content_host.default_rhel_version])
def test_negative_ansible_job_timeout_to_kill(
self, target_sat, module_org, module_location, module_ak_with_synced_repo, rhel_contenthost
):
Expand Down Expand Up @@ -575,8 +581,9 @@ def test_negative_ansible_job_timeout_to_kill(
result = rhel_contenthost.register(
module_org, module_location, module_ak_with_synced_repo.name, target_sat
)
assert result.status == 0, f'Failed to register host: {result.stderr}'

if rhel_contenthost.os_version.major != 6:
assert result.status == 0, f'Failed to register host: {result.stderr}'
assert rhel_contenthost.subscribed
template_id = (
target_sat.api.JobTemplate()
.search(query={'search': 'name="Ansible - Run playbook"'})[0]
Expand Down Expand Up @@ -659,7 +666,9 @@ def test_positive_ansible_job_privilege_escalation(
result = rhel_contenthost.register(
module_org, module_location, module_ak_with_synced_repo.name, target_sat
)
assert result.status == 0, f'Failed to register host: {result.stderr}'
if rhel_contenthost.os_version.major != 6:
assert result.status == 0, f'Failed to register host: {result.stderr}'
assert rhel_contenthost.subscribed
assert rhel_contenthost.execute('useradd testing').status == 0
pwd = rhel_contenthost.execute(
f'echo {settings.server.ssh_password} | passwd testing --stdin'
Expand Down
11 changes: 6 additions & 5 deletions tests/foreman/api/test_capsulecontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ def test_positive_remove_capsule_orphans(
'repos_collection',
[
{
'distro': 'rhel9',
'distro': f'rhel{settings.content_host.default_rhel_version}',
'YumRepository': {'url': settings.repos.yum_0.url},
}
],
Expand Down Expand Up @@ -1518,22 +1518,23 @@ def test_complete_sync_fixes_metadata(
location=default_location,
activation_keys=[repos_collection.setup_content_data['activation_key']['name']],
)
assert result.status == 0, f'Failed to register host: {result.stderr}'
if rhel_contenthost.os_version.major != 6:
assert result.status == 0, f'Failed to register host: {result.stderr}'
host = module_target_sat.api.Host().search(
query={'search': f'name="{rhel_contenthost.hostname}"'}
)[0]
assert nc.id == host.content_facet_attributes['content_source_id'], (
'Expected to see the Capsule as the content source'
)

result = rhel_contenthost.execute('dnf repolist')
result = rhel_contenthost.execute('yum repolist')
assert result.status == 0
assert repos_collection.setup_content_data['repos'][0].content_label in result.stdout

result = rhel_contenthost.execute('dnf install -y cheetah') # with dependencies
result = rhel_contenthost.execute('yum install -y cheetah') # with dependencies
assert result.status == 0

result = rhel_contenthost.execute('dnf -y update')
result = rhel_contenthost.execute('yum -y update')
assert result.status == 0

@pytest.mark.skip_if_not_set('capsule')
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/api/test_computeresource_vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@pytest.mark.parametrize('vmware', ['vmware7', 'vmware8'], indirect=True)
@pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True)
@pytest.mark.parametrize('provision_method', ['build', 'bootdisk'])
@pytest.mark.rhel_ver_match('[8]')
@pytest.mark.rhel_ver_list([settings.content_host.default_rhel_version])
def test_positive_provision_end_to_end(
request,
setting_update,
Expand Down
9 changes: 5 additions & 4 deletions tests/foreman/api/test_discoveredhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import pytest
from wait_for import TimedOutError, wait_for

from robottelo.config import settings
from robottelo.logging import logger
from robottelo.utils.datafactory import valid_data_list

Expand Down Expand Up @@ -169,7 +170,7 @@ class TestDiscoveredHost:
@pytest.mark.on_premises_provisioning
@pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True)
@pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True)
@pytest.mark.rhel_ver_list([8, 9])
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_positive_provision_pxe_host(
self,
module_provisioning_rhel_content,
Expand Down Expand Up @@ -223,7 +224,7 @@ def test_positive_provision_pxe_host(
@pytest.mark.on_premises_provisioning
@pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True)
@pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True)
@pytest.mark.rhel_ver_list([8, 9])
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_positive_provision_pxe_less_host(
self,
module_discovery_sat,
Expand Down Expand Up @@ -352,7 +353,7 @@ def test_positive_refresh_facts_pxe_host(self, module_target_sat):
@pytest.mark.on_premises_provisioning
@pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True)
@pytest.mark.parametrize('pxe_loader', ['uefi'], indirect=True)
@pytest.mark.rhel_ver_match('9')
@pytest.mark.rhel_ver_list([settings.content_host.default_rhel_version])
def test_positive_reboot_pxe_host(
self,
module_provisioning_rhel_content,
Expand Down Expand Up @@ -394,7 +395,7 @@ def test_positive_reboot_pxe_host(

@pytest.mark.on_premises_provisioning
@pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True)
@pytest.mark.rhel_ver_match('9')
@pytest.mark.rhel_ver_list([settings.content_host.default_rhel_version])
def test_positive_reboot_all_pxe_hosts(
self,
module_provisioning_rhel_content,
Expand Down
14 changes: 8 additions & 6 deletions tests/foreman/api/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def _publish_and_wait(sat, org, cv, search_rate=1, max_tries=10):


@pytest.mark.upgrade
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
@pytest.mark.no_containers
@pytest.mark.e2e
def test_positive_install_in_hc(
Expand Down Expand Up @@ -579,9 +579,10 @@ def test_positive_install_in_hc(
target=target_sat,
loc=None,
)
assert result.status == 0, (
f'Failed to register the host - {client.hostname}: {result.stderr}'
)
if client.os_version.major != 6:
assert result.status == 0, (
f'Failed to register the host - {client.hostname}: {result.stderr}'
)
client.add_rex_key(satellite=target_sat)
assert client.subscribed
client.run(r'subscription-manager repos --enable \*')
Expand Down Expand Up @@ -705,7 +706,7 @@ def test_positive_install_in_hc(
)


@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
@pytest.mark.no_containers
@pytest.mark.e2e
@pytest.mark.pit_client
Expand Down Expand Up @@ -1496,7 +1497,8 @@ def test_positive_incremental_update_apply_to_envs_cvs(
target=target_sat,
loc=None,
)
assert result.status == 0, f'Failed to register the host: {rhel_contenthost.hostname}'
if rhel_contenthost.os_version.major != 6:
assert result.status == 0, f'Failed to register the host: {rhel_contenthost.hostname}'
assert rhel_contenthost.subscribed
rhel_contenthost.execute(r'subscription-manager repos --enable \*')

Expand Down
3 changes: 2 additions & 1 deletion tests/foreman/api/test_http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ def test_positive_install_content_with_http_proxy(
target=module_target_sat,
loc=None,
)
assert result.status == 0, f'Failed to register the host: {rhel_contenthost.hostname}'
if rhel_contenthost.os_version.major != 6:
assert result.status == 0, f'Failed to register the host: {rhel_contenthost.hostname}'
assert rhel_contenthost.subscribed

result = rhel_contenthost.execute(f'yum install -y {pkg_name}')
Expand Down
10 changes: 5 additions & 5 deletions tests/foreman/api/test_provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def assert_host_logs(channel, pattern):
@pytest.mark.upgrade
@pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True)
@pytest.mark.on_premises_provisioning
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_rhel_pxe_provisioning(
request,
module_provisioning_sat,
Expand Down Expand Up @@ -208,7 +208,7 @@ def test_rhel_pxe_provisioning(
@pytest.mark.upgrade
@pytest.mark.parametrize('pxe_loader', ['ipxe'], indirect=True)
@pytest.mark.on_premises_provisioning
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_rhel_ipxe_provisioning(
request,
module_provisioning_sat,
Expand Down Expand Up @@ -338,7 +338,7 @@ def test_rhel_ipxe_provisioning(
@pytest.mark.upgrade
@pytest.mark.parametrize('pxe_loader', ['http_uefi'], indirect=True)
@pytest.mark.on_premises_provisioning
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_rhel_httpboot_provisioning(
request,
module_provisioning_sat,
Expand Down Expand Up @@ -465,7 +465,7 @@ def test_rhel_httpboot_provisioning(

@pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True)
@pytest.mark.on_premises_provisioning
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_rhel_pxe_provisioning_fips_enabled(
request,
module_provisioning_sat,
Expand Down Expand Up @@ -711,7 +711,7 @@ def test_rhel_pxe_provisioning_secureboot_enabled(
@pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True)
@pytest.mark.skip(reason='Skipping till we have destructive support')
@pytest.mark.on_premises_provisioning
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_capsule_pxe_provisioning(
request,
capsule_provisioning_sat,
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/api/test_provisioning_puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_positive_puppet_bootstrap(


@pytest.mark.on_premises_provisioning
@pytest.mark.rhel_ver_match('[^6]')
@pytest.mark.rhel_ver_list(r'^[\d]+$')
def test_host_provisioning_with_external_puppetserver(
request,
external_puppet_server,
Expand Down
Loading