Skip to content

Commit

Permalink
added skip for proxy tests when testing environment is used
Browse files Browse the repository at this point in the history
  • Loading branch information
jstavel committed Dec 6, 2024
1 parent 76004fc commit dac6127
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integration-tests/test_register_with_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def test_register_with_noauth_proxy(external_candlepin, subman, test_config):
2024-11-27 03:16:10,163 [DEBUG] subscription-manager:23907:MainThread @connection.py:773 - Using proxy: auto-services.usersys.redhat.com:3129
should appear in /var/log/rhsm/rhsm.log file.
"""
if test_config.environment == "testing":
pytest.skip("Proxy connection cannot be tested in testing environment - ie. local candlepin is used")

assert not subman.is_registered
proxy = RHSM.get_proxy(RHSM_REGISTER_SERVER)
with RHSMPrivateBus(proxy) as private_bus:
Expand All @@ -52,7 +55,6 @@ def test_register_with_noauth_proxy(external_candlepin, subman, test_config):
assert f"Using proxy:" in logfile.read()




def test_register_with_auth_proxy(external_candlepin, subman, test_config):
"""
Expand All @@ -62,6 +64,9 @@ def test_register_with_auth_proxy(external_candlepin, subman, test_config):
2024-11-27 03:16:10,163 [DEBUG] subscription-manager:23907:MainThread @connection.py:773 - Using proxy: auto-services.usersys.redhat.com:3129
should appear in /var/log/rhsm/rhsm.log file.
"""
if test_config.environment == "testing":
pytest.skip("Proxy connection cannot be tested in testing environment - ie. local candlepin is used")

assert not subman.is_registered
proxy = RHSM.get_proxy(RHSM_REGISTER_SERVER)
with RHSMPrivateBus(proxy) as private_bus:
Expand Down

0 comments on commit dac6127

Please sign in to comment.