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

ensure mqtt capsule is not bypassed #13817

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

pondrejk
Copy link
Contributor

Problem Statement

With global proxy setting on, it is possible that if the mqtt capsule is not reached, the default one is used instead. In such case we wouldn't find out there is a problem.

Solution

This PR forces the registered through capsule for the tests using external capsule

@pondrejk pondrejk added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 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 Jan 17, 2024
@pondrejk pondrejk self-assigned this Jan 17, 2024
@pondrejk pondrejk requested a review from a team as a code owner January 17, 2024 16:20
@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_pull_provider[rhel8]

@pondrejk pondrejk marked this pull request as draft January 18, 2024 12:21
@pondrejk pondrejk marked this pull request as ready for review January 18, 2024 16:21
Copy link
Contributor

@synkd synkd left a comment

Choose a reason for hiding this comment

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

Looks good,, suggestions are non-blocking typo corrections.

tests/foreman/cli/test_remoteexecution.py Outdated Show resolved Hide resolved
tests/foreman/cli/test_remoteexecution.py Outdated Show resolved Hide resolved
tests/foreman/api/test_remoteexecution.py Outdated Show resolved Hide resolved
@pondrejk
Copy link
Contributor Author

applied suggestions, note: please do squash-merge

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.

Shouldn't both modified tests use the setting_update fixture to ensure that the setting returns to its original value? That way, the environment should stay unchanged for other tests that will run after these two.
https://github.com/SatelliteQE/robottelo/blob/2b1bf9b56d4ce61dd2d042ff16148958aa2c83ee/pytest_fixtures/component/settings.py#L6-L22

@pondrejk pondrejk force-pushed the pull-rex-fixes branch 2 times, most recently from 92bd8aa to 1c1e692 Compare January 23, 2024 09:50
@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_pull_provider[rhel8]

@ogajduse
Copy link
Member

ACK
But a fix is still needed. Fixture name is missing in the test function definition or @pytest.mark.usefixtures("setting_update") is not used.

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_pull_provider[rhel8]

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_pull_provider[rhel8-remote_execution_global_proxy=False]

@rplevka rplevka self-requested a review January 26, 2024 13:37
@@ -73,13 +73,15 @@ def test_positive_run_capsule_upgrade_playbook(module_capsule_configured, target
@pytest.mark.tier3
@pytest.mark.no_containers
@pytest.mark.rhel_ver_list('8')
@pytest.mark.parametrize('setting_update', ['remote_execution_global_proxy=False'], indirect=True)
Copy link
Member

Choose a reason for hiding this comment

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

with unchanged parameter name, pytest has issues with =False in the test name (see your recent PRT job).
I'd suggest calling the parameter no-rex-global-proxy or so.
you can do it by passing another parameter, called ids
relevant docs

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: test_positive_run_job_on_host_registered_to_pull_provider[rhel8-no_global_proxy]

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_pull_provider[rhel9-no_global_proxy]

@rplevka rplevka self-requested a review January 30, 2024 10:38
@rplevka rplevka merged commit 7f317a6 into SatelliteQE:master Jan 30, 2024
6 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 30, 2024
github-actions bot pushed a commit that referenced this pull request Jan 30, 2024
github-actions bot pushed a commit that referenced this pull request Jan 30, 2024
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 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.

4 participants