Skip to content

Add possibility to specify download-utility#16912

Merged
ogajduse merged 2 commits intoSatelliteQE:masterfrom
ATIX-AG:download-utility
Mar 17, 2025
Merged

Add possibility to specify download-utility#16912
ogajduse merged 2 commits intoSatelliteQE:masterfrom
ATIX-AG:download-utility

Conversation

@dosas
Copy link
Collaborator

@dosas dosas commented Nov 13, 2024

Problem Statement

newly added download utility option missing theforeman/foreman#9808

Solution

Add field

Related Issues

dependency SatelliteQE/nailgun#1257

@dosas dosas added CherryPick PR needs CherryPick to previous branches 6.16.z labels Nov 13, 2024
@dosas dosas requested a review from a team as a code owner November 13, 2024 15:57
@Satellite-QE
Copy link
Collaborator

Can one of the admins verify this patch?

@Gauravtalreja1 Gauravtalreja1 requested a review from a team November 14, 2024 08:05
Comment on lines +707 to +709
if download_utility is not None:
options['download-utility'] = download_utility
Copy link
Member

Choose a reason for hiding this comment

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

@dosas Do you intent to add some test to cover this option?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Obviously I did not intent to ;) but if you point me in the right direction I can add a test.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, this tests can be added to any of tests/foreman/{api,cli,ui}/test_registration.py, and you can check of any e2e marked tests present in this modules for reference.

Copy link
Collaborator Author

@dosas dosas Jan 7, 2025

Choose a reason for hiding this comment

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

@Gauravtalreja1 I thought you were talking about a test in tests/robottelo ...

I doubt that we can add a meaningful e2e test for this on rhel operating systems because this option was specifically added for debian based operating systems where instead of curl wget is installed on default.

Or are you talking about a test where we just set the option explicitly to curl?

Copy link
Member

Choose a reason for hiding this comment

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

@dosas yes, I get that, but I meant like we've option to install wget first on rhel/centos as part of test setup, then running a registration command with download_utility=wget

Copy link
Collaborator Author

@dosas dosas Feb 6, 2025

Choose a reason for hiding this comment

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

@Gauravtalreja1 I have added a test but I have no idea how (and where in the setup) I can install a package on an unregistered contenthost? Could you give me a hint?

Also which ID should I use for the new test?

Copy link
Member

Choose a reason for hiding this comment

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

@dosas For the test ID: simply generate a new UUID. See https://github.com/SatelliteQE/robottelo/wiki/Robottelo-Contributing-Guidelines#required-docstring-content

To ensure the content is already on the host:

  1. ensure that the host already has required tooling installed or
  2. Write a fixture, register the host, enable repositories if needed, install tooling, unregister the host.

Our hosts already have both tools installed, however I do not like the fact that they come with pre-installed, non-default packages. In my view, robottelo should assume a host with a minimal installation. By minimal installation, I mean either the Minimal Install or Core package groups (dnf group info "Core"). I would prefer going with 2., however it is not ideal to register twice per test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ogajduse I fixed the uuid.

If we go with option 1. it should already be possible to run the PRT on this test?

tests/foreman/cli/test_registration.py::test_positive_register_download_utility

would you mind triggering it?

@dosas dosas force-pushed the download-utility branch from a7a7f4c to 37cb984 Compare March 10, 2025 12:07
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10556
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_registration.py::test_positive_register_download_utility --external-logging
Test Result: ================== 8 warnings, 2 errors in 6856.76s (1:54:16) ==================

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10565
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_registration.py::test_positive_register_download_utility --external-logging
Test Result: ================= 2 passed, 106 warnings in 1358.30s (0:22:38) =================

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.

Thank you, @dosas. Let's get it in.

@ogajduse ogajduse merged commit 8805451 into SatelliteQE:master Mar 17, 2025
9 checks passed
@ogajduse ogajduse added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Mar 17, 2025
github-actions bot pushed a commit that referenced this pull request Mar 17, 2025
* Add possibility to specify download-utility

in host registration

see also theforeman/foreman#9808

* Add test for registration property download utility

(cherry picked from commit 8805451)
github-actions bot pushed a commit that referenced this pull request Mar 17, 2025
* Add possibility to specify download-utility

in host registration

see also theforeman/foreman#9808

* Add test for registration property download utility

(cherry picked from commit 8805451)
Gauravtalreja1 pushed a commit that referenced this pull request Mar 19, 2025
Add possibility to specify download-utility (#16912)

* Add possibility to specify download-utility

in host registration

see also theforeman/foreman#9808

* Add test for registration property download utility

(cherry picked from commit 8805451)

Co-authored-by: dosas <dosas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.16.z 6.17.z AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants