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

Fix HTTP proxy teardown #15229

Merged
merged 1 commit into from
May 30, 2024

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented May 30, 2024

Problem Statement

In #14513 I overlooked that http_proxy can be even None which does not implement the delete() method so the teardown fails with

pytest_fixtures/component/http_proxy.py:32: in setup_http_proxy
    http_proxy.delete()
E   AttributeError: 'NoneType' object has no attribute 'delete'

Solution

Delete only existing objects.

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/api/test_http_proxy.py -k test_positive_install_content_with_http_proxy

@vsedmik vsedmik added CherryPick PR needs CherryPick to previous branches 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z labels May 30, 2024
@vsedmik vsedmik self-assigned this May 30, 2024
@vsedmik vsedmik requested a review from a team as a code owner May 30, 2024 10:13
@vsedmik
Copy link
Contributor Author

vsedmik commented May 30, 2024

trigger: test-robottelo
pytest: tests/foreman/api/test_http_proxy.py -k test_positive_install_content_with_http_proxy

@vsedmik vsedmik added the Easy Fix :) Easiest Fix to review and quick merge request. label May 30, 2024
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7201
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_http_proxy.py -k test_positive_install_content_with_http_proxy --external-logging
Test Result : ========== 3 passed, 4 deselected, 116 warnings in 947.14s (0:15:47) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label May 30, 2024
@jameerpathan111 jameerpathan111 merged commit 46b510f into SatelliteQE:master May 30, 2024
14 checks passed
github-actions bot pushed a commit that referenced this pull request May 30, 2024
(cherry picked from commit 46b510f)
github-actions bot pushed a commit that referenced this pull request May 30, 2024
(cherry picked from commit 46b510f)
github-actions bot pushed a commit that referenced this pull request May 30, 2024
(cherry picked from commit 46b510f)
vsedmik added a commit that referenced this pull request May 30, 2024
Fix HTTP proxy teardown (#15229)

(cherry picked from commit 46b510f)

Co-authored-by: vsedmik <46570670+vsedmik@users.noreply.github.com>
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 Easy Fix :) Easiest Fix to review and quick merge request. PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants