Skip to content

Commit

Permalink
New parametrizations for Errata rhel chosts
Browse files Browse the repository at this point in the history
  • Loading branch information
damoore044 committed Nov 18, 2024
1 parent b5a02f1 commit 8c83f78
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
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', 10, '10_fips']
versions: [7,'7_fips', 8, '8_fips', 9, '9_fips', 10,]
2 changes: 1 addition & 1 deletion pytest_plugins/fixture_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def pytest_generate_tests(metafunc):
if 'fips' not in str(setting_rhel_ver)
][-(num_versions + 1) :] # inclusive (+1) to collect N as well
match_params.extend(filtered_versions)
# match versions with existing markers
# match versions with existing regex markers
else:
for matcher in matchers:
match_params.extend(
Expand Down
2 changes: 1 addition & 1 deletion pytest_plugins/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def pytest_configure(config):
"run_in_one_thread: Sequential tests",
"build_sanity: Fast, basic tests that confirm build is ready for full test suite",
"rhel_ver_list: Filter rhel_contenthost versions by list",
"rhel_ver_match: Filter rhel_contenthost versions by regexp",
"rhel_ver_match: Filter rhel_contenthost versions by regexp, or format 'N-#'",
"no_containers: Disable container hosts from being used in favor of VMs",
"include_capsule: For satellite-maintain tests to run on Satellite and Capsule both",
"capsule_only: For satellite-maintain tests to run only on Capsules",
Expand Down
4 changes: 2 additions & 2 deletions tests/foreman/api/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def _publish_and_wait(sat, org, cv, search_rate=1, max_tries=10):

@pytest.mark.upgrade
@pytest.mark.tier3
@pytest.mark.rhel_ver_match('N-2') # latest 3 major ver supported, exclude fips
@pytest.mark.rhel_ver_match(r'^(?!.*fips).*$') # all major versions, excluding fips
@pytest.mark.no_containers
@pytest.mark.e2e
def test_positive_install_in_hc(
Expand Down Expand Up @@ -656,7 +656,7 @@ def test_positive_install_in_hc(


@pytest.mark.tier3
@pytest.mark.rhel_ver_match(r'^(?!.*(7|fips)).*$') # exclude any fips or major ver 7
@pytest.mark.rhel_ver_match(r'^(?!.*fips).*$') # all major versions, excluding fips
@pytest.mark.no_containers
@pytest.mark.e2e
@pytest.mark.pit_client
Expand Down
12 changes: 6 additions & 6 deletions tests/foreman/cli/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ def errata_host(

@pytest.mark.tier2
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-1') # Newest major RHEL version (N), and the one prior.
def test_apply_errata_using_default_content_view(errata_host, module_sca_manifest_org, target_sat):
"""Updating an applicable errata on a host attached to the default content view
causes the errata to not be applicable.
Expand Down Expand Up @@ -1281,7 +1281,7 @@ def test_apply_errata_using_default_content_view(errata_host, module_sca_manifes

@pytest.mark.tier2
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-1')
def test_update_applicable_package_using_default_content_view(errata_host, target_sat):
"""Updating an applicable package on a host attached to the default content view causes the
package to not be applicable or installable.
Expand Down Expand Up @@ -1340,7 +1340,7 @@ def test_update_applicable_package_using_default_content_view(errata_host, targe

@pytest.mark.tier2
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-1')
def test_downgrade_applicable_package_using_default_content_view(errata_host, target_sat):
"""Downgrading a package on a host attached to the default content view
causes the package to become applicable and installable.
Expand Down Expand Up @@ -1389,7 +1389,7 @@ def test_downgrade_applicable_package_using_default_content_view(errata_host, ta


@pytest.mark.tier2
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
def test_install_applicable_package_to_registered_host(errata_host, target_sat):
"""Installing an older package to an already registered host should show the newer package
and errata as applicable and installable.
Expand Down Expand Up @@ -1437,7 +1437,7 @@ def test_install_applicable_package_to_registered_host(errata_host, target_sat):

@pytest.mark.tier2
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
def test_downgrading_package_shows_errata_from_library(
errata_host, module_sca_manifest_org, target_sat
):
Expand Down Expand Up @@ -1542,7 +1542,7 @@ def test_errata_list_by_contentview_filter(module_sca_manifest_org, module_targe
assert errata_count != errata_count_cvf


@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
def test_positive_verify_errata_recalculate_tasks(target_sat, errata_host):
"""Verify 'Actions::Katello::Applicability::Hosts::BulkGenerate' tasks proceed on 'worker-hosts-queue-1.service'
Expand Down
32 changes: 16 additions & 16 deletions tests/foreman/ui/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def cleanup():

@pytest.mark.e2e
@pytest.mark.tier3
@pytest.mark.rhel_ver_match('[^7]|10')
@pytest.mark.rhel_ver_match('N-3') # Newest major RHEL version (N), and three prior.
@pytest.mark.parametrize('registered_contenthost', [[CUSTOM_REPO_URL]], indirect=True)
@pytest.mark.no_containers
def test_end_to_end(
Expand Down Expand Up @@ -486,7 +486,7 @@ def test_end_to_end(

@pytest.mark.tier2
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
@pytest.mark.parametrize('registered_contenthost', [[CUSTOM_REPO_3_URL]], indirect=True)
@pytest.mark.skipif((not settings.robottelo.REPOS_HOSTING_URL), reason='Missing repos_hosting_url')
def test_host_content_errata_tab_pagination(
Expand All @@ -502,7 +502,7 @@ def test_host_content_errata_tab_pagination(
# Test apply by REX using Select All for BZ#1846670
:setup:
1. rhel8 registered contenthost with custom repos enabled.
1. registered contenthost with custom repos enabled.
2. enable and sync rh repository.
3. add rh repo to cv for registered host and publish/promote.
Expand Down Expand Up @@ -793,7 +793,7 @@ def test_positive_list_permission(
product only.
"""
module_target_sat.api_factory.enable_sync_redhat_repo(
constants.REPOS['rhsclient8'],
constants.REPOS['rhsclient9'],
function_sca_manifest_org.id,
)
custom_repo = module_target_sat.api.Repository(
Expand All @@ -808,7 +808,7 @@ def test_positive_list_permission(
query={'search': 'resource_type="Katello::Product"'}
),
role=role,
search=f'name = "{PRDS["rhel8"]}"',
search=f'name = "{PRDS["rhel9"]}"',
).create()
# generate login credentials for new role
user_password = gen_string('alphanumeric')
Expand Down Expand Up @@ -854,7 +854,7 @@ def test_positive_apply_for_all_hosts(
:setup:
1. Create and sync one custom repo for all hosts, add to a content-view.
2. Checkout four rhel9 contenthosts via Broker.
2. Checkout four contenthosts, latest rhel ver, via Broker.
3. Register all of the hosts to the same AK, CV, single repo.
:steps:
Expand Down Expand Up @@ -968,7 +968,7 @@ def test_positive_apply_for_all_hosts(

@pytest.mark.tier2
@pytest.mark.upgrade
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-1')
def test_positive_view_cve(session, module_product, module_sca_manifest_org, target_sat):
"""View CVE number(s) in Errata Details page
Expand Down Expand Up @@ -1034,7 +1034,7 @@ def test_positive_filter_by_environment(
module_cv.repository = [custom_repo]
module_cv.update(['repository'])

with Broker(nick='rhel8', host_class=ContentHost, _count=3) as clients:
with Broker(nick='rhel9', workflow='deploy-rhel', host_class=ContentHost, _count=3) as clients:
for client in clients:
# register all hosts to the same AK, CV:
setup = target_sat.api_factory.register_host_and_needed_setup(
Expand Down Expand Up @@ -1093,7 +1093,7 @@ def test_positive_filter_by_environment(
[[CUSTOM_REPO_URL]],
indirect=True,
)
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
def test_positive_content_host_previous_env(
session,
module_cv,
Expand Down Expand Up @@ -1162,7 +1162,7 @@ def test_positive_content_host_previous_env(


@pytest.mark.tier2
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
@pytest.mark.parametrize(
'registered_contenthost',
[[CUSTOM_REPO_URL]],
Expand Down Expand Up @@ -1194,7 +1194,7 @@ def test_positive_check_errata(session, registered_contenthost):


@pytest.mark.tier3
@pytest.mark.rhel_ver_match('[8, 9]')
@pytest.mark.rhel_ver_match('N-2')
@pytest.mark.parametrize(
'registered_contenthost',
[['Library', CUSTOM_REPO_URL]],
Expand Down Expand Up @@ -1266,7 +1266,7 @@ def test_positive_host_content_library(


@pytest.mark.tier3
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-1')
@pytest.mark.parametrize(
'registered_contenthost',
[[CUSTOM_REPO_URL]],
Expand Down Expand Up @@ -1331,7 +1331,7 @@ def test_positive_errata_search_type(session, module_sca_manifest_org, registere


@pytest.mark.tier3
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
@pytest.mark.parametrize(
'registered_contenthost',
[[CUSTOM_REPO_URL]],
Expand Down Expand Up @@ -1437,7 +1437,7 @@ def test_positive_show_count_on_host_pages(session, module_org, registered_conte


@pytest.mark.tier3
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-2')
@pytest.mark.parametrize(
'registered_contenthost',
[[CUSTOM_REPO_URL]],
Expand Down Expand Up @@ -1511,7 +1511,7 @@ def test_positive_check_errata_counts_by_type_on_host_details_page(
@pytest.mark.upgrade
@pytest.mark.skipif((not settings.robottelo.REPOS_HOSTING_URL), reason='Missing repos_hosting_url')
@pytest.mark.parametrize('setting_update', ['errata_status_installable'], indirect=True)
@pytest.mark.rhel_ver_match('8')
@pytest.mark.rhel_ver_match('N-1')
@pytest.mark.parametrize(
'registered_contenthost',
[[CUSTOM_REPO_URL]],
Expand Down Expand Up @@ -1663,7 +1663,7 @@ def test_content_host_errata_search_commands(
cvs = [module_cv.read(), content_view.read()] # client0, client1
# walrus-0.71-1.noarch (RHSA), kangaroo-0.1-1.noarch (RHBA)
packages = [FAKE_1_CUSTOM_PACKAGE, FAKE_4_CUSTOM_PACKAGE]
with Broker(nick='rhel8', host_class=ContentHost, _count=2) as clients:
with Broker(nick='rhel9', workflow='deploy-rhel', host_class=ContentHost, _count=2) as clients:
for (
client,
cv,
Expand Down

0 comments on commit 8c83f78

Please sign in to comment.