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

Add coverage for BZ#2173756 #13202

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Nov 28, 2023

This PR just adds coverage for BZ#2173756 - export/import RH yum repo incrementally (via CV) and consume it on a content host.

@vsedmik vsedmik added CLI Issues and PRs involving the CLI QETestCoverage Issues and PRs relating to a Satellite bug CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Nov 28, 2023
@vsedmik vsedmik self-assigned this Nov 28, 2023
@vsedmik vsedmik requested a review from a team as a code owner November 28, 2023 20:51
@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 28, 2023

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume

Copy link
Contributor

@pondrejk pondrejk left a comment

Choose a reason for hiding this comment

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

few comments, rebase needed

:customerscenario: true
"""
res = rhel_contenthost.execute('ansible --version')
assert res.status, 'Ansible must not be preinstalled on the host for this test case'
Copy link
Contributor

Choose a reason for hiding this comment

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

so what are we asserting here? the existence of the status? I'd rather be specific about the expected value of res.status

), 'Package count available on the host did not meet the expectation'

res = rhel_contenthost.execute(f'dnf -y install {filtered_pkg}')
assert res.status, 'Installation of filtered package succeeded unexpectedly'
Copy link
Contributor

Choose a reason for hiding this comment

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

also here, does it mean res.status != 0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it means res.status > 0

tests/foreman/cli/test_satellitesync.py Outdated Show resolved Hide resolved
@pytest.mark.e2e
@pytest.mark.tier3
@pytest.mark.no_containers
@pytest.mark.rhel_ver_list([8])
Copy link
Contributor

Choose a reason for hiding this comment

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

Why hardcode RHEL 8?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we use particular repo to test with too (Ansible Engine for RHEL8). I guess there is no need to test with multiple RHELs where is the repo available.

@pytest.mark.rhel_ver_list([8])
@pytest.mark.parametrize(
'function_synced_rhel_repo',
['rhae2.9_el8'],
Copy link
Contributor

Choose a reason for hiding this comment

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

RHEL8 is also hardcoded here. If the above comment is addressed, this one needs it, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, answered above.

tests/foreman/cli/test_satellitesync.py Show resolved Hide resolved
@vsedmik
Copy link
Contributor Author

vsedmik commented Dec 12, 2023

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume

@vsedmik
Copy link
Contributor Author

vsedmik commented Dec 12, 2023

PRT seems to fail due to this https://bugzilla.redhat.com/show_bug.cgi?id=2253673

@vsedmik
Copy link
Contributor Author

vsedmik commented Dec 12, 2023

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume
env:
ROBOTTELO_server__deploy_arguments__deploy_rhel_version: '8'
ROBOTTELO_server__deploy_arguments__deploy_sat_version: 'stream'
ROBOTTELO_server__deploy_arguments__deploy_snap_version: '39'

@vsedmik
Copy link
Contributor Author

vsedmik commented Dec 19, 2023

Removed old stub, rebased.

@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 2, 2024

Resolved conflict and rebased.

@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 3, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume
env:
  ROBOTTELO_server__deploy_arguments__deploy_rhel_version: '8'
  ROBOTTELO_server__deploy_arguments__deploy_sat_version: 'stream'
  ROBOTTELO_server__deploy_arguments__deploy_snap_version: '39'

@vsedmik vsedmik force-pushed the iss-host-consume branch 4 times, most recently from 54bf1e6 to 238f677 Compare January 9, 2024 10:20
@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 9, 2024

Resolved conflicts, rebased.

@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 9, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume

@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 9, 2024

Looks like the python-pulpcore-3.39.4-1 is still not in stream, though it is in 6.15.0 already, so PRT failed against stream.

EDIT: It should get in Stream snap 44.0. Stay tuned!

@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 9, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume
env:
  ROBOTTELO_server__deploy_arguments__deploy_rhel_version: '8'
  ROBOTTELO_server__deploy_arguments__deploy_sat_version: 'stream'
  ROBOTTELO_server__deploy_arguments__deploy_snap_version: '39'

Copy link
Member

@ogajduse ogajduse left a comment

Choose a reason for hiding this comment

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

Co-reviewed with @rplevka.

tests/foreman/cli/test_satellitesync.py Outdated Show resolved Hide resolved
tests/foreman/cli/test_satellitesync.py Outdated Show resolved Hide resolved
tests/foreman/cli/test_satellitesync.py Show resolved Hide resolved
Copy link
Member

@rplevka rplevka left a comment

Choose a reason for hiding this comment

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

ACK, pending @ogajduse requests for changes (we did the review together)

@vsedmik
Copy link
Contributor Author

vsedmik commented Jan 17, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_satellitesync.py -k consume

@vsedmik vsedmik requested a review from ogajduse January 17, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches CLI Issues and PRs involving the CLI QETestCoverage Issues and PRs relating to a Satellite bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants