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 useless asserts in installer tests #14099

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/foreman/destructive/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def test_installer_sat_pub_directory_accessibility(target_sat):
https_curl_command = f'curl -i {target_sat.url}/pub/ -k'
for command in [http_curl_command, https_curl_command]:
accessibility_check = target_sat.execute(command)
assert 'HTTP/1.1 200 OK' or 'HTTP/2 200 ' in accessibility_check.stdout.split('\r\n')
assert (
'HTTP/1.1 200 OK' in accessibility_check.stdout
or 'HTTP/2 200' in accessibility_check.stdout
)
target_sat.get(
local_path='custom-hiera-satellite.yaml',
remote_path=f'{custom_hiera_location}',
Expand All @@ -74,7 +77,8 @@ def test_installer_sat_pub_directory_accessibility(target_sat):
assert 'Success!' in command_output.stdout
for command in [http_curl_command, https_curl_command]:
accessibility_check = target_sat.execute(command)
assert 'HTTP/1.1 200 OK' or 'HTTP/2 200 ' not in accessibility_check.stdout.split('\r\n')
assert 'HTTP/1.1 200 OK' not in accessibility_check.stdout
assert 'HTTP/2 200' not in accessibility_check.stdout
target_sat.put(
local_path='custom-hiera-satellite.yaml',
remote_path=f'{custom_hiera_location}',
Expand Down
8 changes: 6 additions & 2 deletions tests/foreman/installer/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,10 @@ def test_installer_cap_pub_directory_accessibility(capsule_configured):
https_curl_command = f'curl -i {capsule_configured.url}/pub/ -k'
for command in [http_curl_command, https_curl_command]:
accessibility_check = capsule_configured.execute(command)
assert 'HTTP/1.1 200 OK' or 'HTTP/2 200 ' in accessibility_check.stdout.split('\r\n')
assert (
'HTTP/1.1 200 OK' in accessibility_check.stdout
or 'HTTP/2 200' in accessibility_check.stdout
)
capsule_configured.get(
local_path='custom-hiera-capsule.yaml',
remote_path=f'{custom_hiera_location}',
Expand All @@ -1766,7 +1769,8 @@ def test_installer_cap_pub_directory_accessibility(capsule_configured):
assert 'Success!' in command_output.stdout
for command in [http_curl_command, https_curl_command]:
accessibility_check = capsule_configured.execute(command)
assert 'HTTP/1.1 200 OK' or 'HTTP/2 200 ' not in accessibility_check.stdout.split('\r\n')
assert 'HTTP/1.1 200 OK' not in accessibility_check.stdout
assert 'HTTP/2 200' not in accessibility_check.stdout
capsule_configured.put(
local_path='custom-hiera-capsule.yaml',
remote_path=f'{custom_hiera_location}',
Expand Down
Loading