Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL10 Support, test in Errata e2e parametrized registered hosts #16807

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

damoore044
Copy link
Contributor

@damoore044 damoore044 commented Oct 28, 2024

  • Add RHEL10 to robottelo supported versions, implement in some existing e2e tests that already use RHEL9 /prior.
  • Fix CLI setup method setup_org_for_a_custom_repo , where updating the activation-key requires the name.
    ^This was a bug, wrapping up reverting those changes

Problem Statement:

  • Almost all existing pytest markers need to be bumped, and will again when RHEL11 is supported or RHEL8 is dropped from support. Existing fixture args regex patterns are matching chars not str, so '10' is excluded from normal collection, unless passed explicitly ('|10') , or we use string matching for regex to get two-digit versions matched, see below.

Solution

  • Pass the rhel_ver_match fixture a string to collect rhel8, 9, and 10 params for fixture rhel_contenthost.
    @pytest.marker.rhel_ver_match(r'^(?!.*(7|fips)).*$') < str match, exclude any with "7" or "fips"
    @pytest.marker.rhel_ver_match('8|9|10') or ('[^7]|10') < pass "10" explicitly

  • ^ Above solutions will need regular bumping, when versions are added or dropped from supportability.yaml

  • @pytest.marker.rhel_ver_match('N-2') N is RHEL10 (newest version), additionally RHEL9, RHEL8

Proposed Fixture change

  • For pytest marker rhel_ver_match , it would be useful to accept input of N-# (major rhel versions). This would be helpful because we won't have to change the fixtures for each and every test, everytime we add a new RHEL version or remove one from supportability.yaml.

  • ie: many tests use ('[^6]') which is 'all single-char versions except 6' , RHEL6 is not in supportability anymore, and 10 is two digits and so will be all future versions. So we would need to pass explicitly, ie ('10|11|12') and bump with each added/removed version.

  • Solution: Accept and check for a strict fixture argument of length 3, "N-#" , where N is always the latest supported version, and # is a single digit number of preceding supported versions to also collect, excluding fips. Existing test markers will not conflict and will be parsed as before, so their collection should not be impacted.

  • Example: @pytest.mark.rhel_ver_match('N-3') would collect 4 params, N which in this PR is RHEL10, along with the 3 preceding supported versions, RHEL9, RHEL8 and RHEL7.

  • To collect a single param for just N (latest version only, here is RHEL10);
    simply pass the fixture rhel_ver_match('N-0')

  • Effect: applicable test's fixtures can be changed to ('N-x') once and should not need changing with each version bump. Existing markers are not effected because they fail they check conditions, and will be parsed as before so should collect/function as before unless changed. Should always look for the latest supported version, and the other priors desired. When a new RHEL major ver is released, and we update supportability, we won't need to update each of these test's fixtures, they will just use the newly supported version N, and # of preceding versions.

PRT

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::CASE[rhel10-ipv4] # for ui/test_errata the param is [rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end --collect-only

@damoore044 damoore044 added CherryPick PR needs CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master 6.16.z Introduced in or relating directly to Satellite 6.16 labels Oct 28, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9172
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : =================== 9 warnings, 1 error in 579.86s (0:09:39) ===================

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Oct 28, 2024
@damoore044 damoore044 marked this pull request as draft October 28, 2024 16:13
@devendra104
Copy link
Member

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9174
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : ================== 9 warnings, 2 errors in 692.91s (0:11:32) ===================

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
deploy_rhel_version: 10
target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9178
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : =================== 9 warnings, 1 error in 600.65s (0:10:00) ===================

@Gauravtalreja1
Copy link
Collaborator

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9215
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : ================= 1 passed, 20 warnings in 1065.16s (0:17:45) ==================

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR PRT-Passed Indicates that latest PRT run is passed for the PR labels Nov 4, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py -k 'test_positive_install_multiple_in_host or test_positive_install_in_hc'
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4]
env:
ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4]
env:
ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

1 similar comment
@devendra104
Copy link
Member

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4]
env:
ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_errata.py -k 'rhel10-ipv4'
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@damoore044 damoore044 marked this pull request as ready for review November 8, 2024 01:35
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9317
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_errata.py -k rhel10-ipv4 --external-logging
Test Result : ========= 6 passed, 42 deselected, 552 warnings in 2513.33s (0:41:53) ==========

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py -k 'rhel10-ipv4'
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9318
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py -k rhel10-ipv4 --external-logging
Test Result : ==== 1 failed, 8 passed, 22 deselected, 1059 warnings in 4281.32s (1:11:21) ====

@Satellite-QE Satellite-QE added PRT-Failed Indicates that latest PRT run is failed for the PR and removed PRT-Passed Indicates that latest PRT run is passed for the PR labels Nov 8, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_host_content_errata_tab_pagination[rhel10-ipv4-registered_contenthost0]
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9319
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_host_content_errata_tab_pagination[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : ================= 1 passed, 23 warnings in 1775.31s (0:29:35) ==================

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Nov 8, 2024
robottelo/host_helpers/cli_factory.py Outdated Show resolved Hide resolved
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 11, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py tests/foreman/api/test_errata.py tests/foreman/cli/test_errata.py -k 'rhel10-ipv4'
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@damoore044
Copy link
Contributor Author

^ Should include 17 Parametrized RHEL10 cases across Errata API, CLI, and UI

@damoore044 damoore044 removed the 6.16.z Introduced in or relating directly to Satellite 6.16 label Nov 11, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_errata.py -k 'rhel10-ipv4'
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9328
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_errata.py -k rhel10-ipv4 --external-logging
Test Result : ========= 42 deselected, 410 warnings, 6 errors in 2098.79s (0:34:58) ==========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Nov 11, 2024
@damoore044
Copy link
Contributor Author

^ Waiting on stream snap 78.0 to bring fix for cli_factory method ^
setup_org_for_a_custom_repo

failed on setup with "robottelo.exceptions.CLIFactoryError: Failed to associate activation-key with CV
Command "activation-key update" finished with status 64
stderr contains:
Could not update the activation key:
  Missing arguments for '--name'."

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_content_host_errata_search_commands
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9337
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_content_host_errata_search_commands --external-logging
Test Result : ================== 1 failed, 9 warnings in 619.85s (0:10:19) ===================

@damoore044
Copy link
Contributor Author

damoore044 commented Nov 12, 2024

^ For tests checking out multiple contenthosts of the same RHEL version,
we will need the 'rhel10' nick added to CI broker_settings.yaml and content_host.yaml.

Related Failure:

>       with Broker(nick='rhel10', host_class=ContentHost, _count=2) as clients:
broker.exceptions.BrokerError: Could not determine an appropriate provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPick PR needs CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants