-
Notifications
You must be signed in to change notification settings - Fork 125
[SAT-33810] New Hosts UI fix - VM setup #18753
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
base: master
Are you sure you want to change the base?
Conversation
trigger: test-robottelo |
PRT Result
|
1456ad5
to
e763531
Compare
trigger: test-robottelo |
PRT Result
|
e763531
to
85633ad
Compare
trigger: test-robottelo |
trigger: test-robottelo |
fd6c3c6
to
a8f5460
Compare
trigger: test-robottelo |
PRT Result
|
PRT Result
|
PRT Result
|
a8f5460
to
62f7d09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes RHEL version handling in UI tests, updates VM setup invocation, enhances custom repo enabling logic, and streamlines repo fixtures.
- Switches hardcoded
rhel8
markers to dynamicN-1
and refactorssetup_virtual_machine
calls to useenable_custom_repos
- Adds SCA fallback via
subscription-manager
incontenthost_setup
and enriches error output - Implements a fallback for missing
distro
inmodule_repos_collection_with_setup
based on pytest markers
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
tests/foreman/ui/test_host.py | Updated parametrization to use N-1 , removed explicit distro , changed VM setup args |
tests/foreman/ui/test_errata.py | Simplified cleanup if client and client.subscribed |
robottelo/hosts.py | Added subscription-manager enable attempt with fallback and error detail |
pytest_fixtures/component/repository.py | Added logic to derive distro from top‐level markers |
62f7d09
to
5eabcd6
Compare
5eabcd6
to
ff9994f
Compare
trigger: test-robottelo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codewisely looks good to me (just one nit), but I wasn't able to find the PRT result to dig into the previous failure. Rerunning now. 🤞
if repos['distro'] is None: | ||
repos['distro'] = fixtures_distro | ||
if repos['distro'] and 'rhel' not in str(repos['distro']): | ||
repos['distro'] = 'rhel' + str(repos['distro']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repos['distro'] = 'rhel' + str(repos['distro']) | |
repos['distro'] = f'rhel{repos['distro']}' |
PRT Result
|
PRT failed with Is it something to be addressed in SatelliteQE/airgun#1888 @damoore044 ? |
Problem Statement
3 new host UI cases failing to setup their virtual machine, outdated args passed, custom repos not enabled, etc.
To parametrize implicitly, without putting a really ugly for loop in the test's parametrization,
I was able to get
module_repos_collection_with_setup
to work withdistro
in request, or without.By falling back on globally defined fixture's RHEL host, declared
rhel_version
, if present.^ Effect: We can still parametrize
module_repos_collection_with_setup
withdistro
explicitly as we currently do.But if
distro
is None or missing, it will look for and fallback on fixture hosts withrhel_version
.Can now parametrize the module_repos_collection fixture with ubiquitous rhel markers:
rhel_ver_match
orrhel_ver_list
.^ but only if
distro
is missing, orNone
.Solution
Resolved setup issues and local pass.
Implicitly parametrize
module_repos_collection_with_setup
for these cases by@pytest.mark.rhel_ver_match('N-1')
RHEL version / distro by
N-1
(2 params for each of the 3 cases).N
in stream is RHEL10.^ instead of hardcoding to
rhel8
, which needs to be updated regularly or becomes outdated.Needs: Airgun#1888
PRT Case