Skip to content

Commit 3b21480

Browse files
vsedmikweb-flow
authored andcommitted
Fix ACS IPv6 tests with ACS HTTP proxy (#18767)
(cherry picked from commit 3fa840f)
1 parent 4f0a45a commit 3b21480

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

tests/foreman/api/test_acs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import pytest
1717
from requests.exceptions import HTTPError
1818

19+
from robottelo.config import settings
1920
from robottelo.constants.repos import PULP_FIXTURE_ROOT, PULP_SUBPATHS_COMBINED
2021

2122

@@ -62,6 +63,14 @@ def test_positive_CRUD_all_types(
6263
'smart_proxy_ids': [module_target_sat.nailgun_capsule.id],
6364
}
6465

66+
# In case of IPv6, set 'ACS HTTP proxy' of the bound capsule to the IPv6 proxy
67+
# This is necessary for the Refresh to succeed.
68+
if not settings.server.network_type.has_ipv4:
69+
caps = module_target_sat.nailgun_smart_proxy
70+
caps.http_proxy = module_target_sat.enable_satellite_http_proxy()
71+
caps.update(['http_proxy'])
72+
params.update({'use_http_proxies': True})
73+
6574
if acs_type == 'simplified':
6675
params.update(
6776
{'product_ids': [module_yum_repo.product.id]}

tests/foreman/cli/test_acs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from fauxfactory import gen_alphanumeric
1616
import pytest
1717

18+
from robottelo.config import settings
1819
from robottelo.constants.repos import PULP_FIXTURE_ROOT, PULP_SUBPATHS_COMBINED
1920
from robottelo.exceptions import CLIReturnCodeError
2021

@@ -71,6 +72,14 @@ def test_positive_CRUD_all_types(
7172
'smart-proxy-ids': module_target_sat.nailgun_capsule.id,
7273
}
7374

75+
# In case of IPv6, set 'ACS HTTP proxy' of the bound capsule to the IPv6 proxy
76+
# This is necessary for the Refresh to succeed.
77+
if not settings.server.network_type.has_ipv4:
78+
caps = module_target_sat.nailgun_smart_proxy
79+
caps.http_proxy = module_target_sat.enable_satellite_http_proxy()
80+
caps.update(['http_proxy'])
81+
params.update({'use-http-proxies': 'true'})
82+
7483
if acs_type == 'simplified':
7584
params.update(
7685
{'product-ids': [module_yum_repo.product.id]}

0 commit comments

Comments
 (0)