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 case for special chars in HTTP proxy password #14538

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Mar 27, 2024

Problem Statement

We are missing coverage for a BZ where the HTTP proxy is created with a user containing special characters in his password.

Solution

Not only we need to create the proxy at the Satellite side, we also need to create the user at the proxy side to verify the content operations actually work. In the end I decided to create such users dynamically during the test run, so I needed to add a new ProxyHost class with a few functions to handle that. The class is instantiated in a session-scoped fixture and used in test and other fixture.

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/ui/test_http_proxy.py -k special

@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 labels Mar 27, 2024
@vsedmik vsedmik self-assigned this Mar 27, 2024
@vsedmik vsedmik requested review from a team as code owners March 27, 2024 11:16
@vsedmik
Copy link
Contributor Author

vsedmik commented Mar 27, 2024

trigger: test-robottelo
pytest: tests/foreman/ui/test_http_proxy.py -k special

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 6220
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_http_proxy.py -k special --external-logging
Test Result : =========== 1 passed, 7 deselected, 5 warnings in 843.25s (0:14:03) ============

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 27, 2024
"""Class representing HTTP Proxy host"""

def __init__(self, url, **kwargs):
self._conf_dir = '/etc/squid/'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self._conf_dir = '/etc/squid/'
self._conf_dir = '/etc/squid'

Strings below would look better if you did this and then called f'{self._conf_dir}/passwd'

@Griffin-Sullivan Griffin-Sullivan merged commit 85dd8bc into SatelliteQE:master Mar 28, 2024
11 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 28, 2024
github-actions bot pushed a commit that referenced this pull request Mar 28, 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.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 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.

4 participants