diff --git a/tests/foreman/api/test_acs.py b/tests/foreman/api/test_acs.py index 8d77b506efb..d61027a3c1d 100644 --- a/tests/foreman/api/test_acs.py +++ b/tests/foreman/api/test_acs.py @@ -16,6 +16,7 @@ import pytest from requests.exceptions import HTTPError +from robottelo.config import settings from robottelo.constants.repos import PULP_FIXTURE_ROOT, PULP_SUBPATHS_COMBINED @@ -62,6 +63,14 @@ def test_positive_CRUD_all_types( 'smart_proxy_ids': [module_target_sat.nailgun_capsule.id], } + # In case of IPv6, set 'ACS HTTP proxy' of the bound capsule to the IPv6 proxy + # This is necessary for the Refresh to succeed. + if not settings.server.network_type.has_ipv4: + caps = module_target_sat.nailgun_smart_proxy + caps.http_proxy = module_target_sat.enable_satellite_http_proxy() + caps.update(['http_proxy']) + params.update({'use_http_proxies': True}) + if acs_type == 'simplified': params.update( {'product_ids': [module_yum_repo.product.id]} diff --git a/tests/foreman/cli/test_acs.py b/tests/foreman/cli/test_acs.py index 4291fba2bd9..87ff9bc9d08 100644 --- a/tests/foreman/cli/test_acs.py +++ b/tests/foreman/cli/test_acs.py @@ -15,6 +15,7 @@ from fauxfactory import gen_alphanumeric import pytest +from robottelo.config import settings from robottelo.constants.repos import PULP_FIXTURE_ROOT, PULP_SUBPATHS_COMBINED from robottelo.exceptions import CLIReturnCodeError @@ -71,6 +72,14 @@ def test_positive_CRUD_all_types( 'smart-proxy-ids': module_target_sat.nailgun_capsule.id, } + # In case of IPv6, set 'ACS HTTP proxy' of the bound capsule to the IPv6 proxy + # This is necessary for the Refresh to succeed. + if not settings.server.network_type.has_ipv4: + caps = module_target_sat.nailgun_smart_proxy + caps.http_proxy = module_target_sat.enable_satellite_http_proxy() + caps.update(['http_proxy']) + params.update({'use-http-proxies': 'true'}) + if acs_type == 'simplified': params.update( {'product-ids': [module_yum_repo.product.id]}