Skip to content

Commit 18a5dd0

Browse files
Update default proxy parameter to content_default_http_proxy
Signed-off-by: Gaurav Talreja <gtalreja@redhat.com>
1 parent 01b028b commit 18a5dd0

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

pytest_fixtures/component/http_proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def setup_http_proxy(request, module_manifest_org, target_sat):
2222
content_proxy = target_sat.api.Setting().search(
2323
query={'search': 'name=content_default_http_proxy'}
2424
)[0]
25-
assert content_proxy.value == http_proxy.name
25+
assert content_proxy.value == http_proxy.name if request.param is not None else ''
2626

2727
if request.param is not None:
2828
general_proxy = (

robottelo/host_helpers/api_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def make_http_proxy(self, org, http_proxy_type):
3838
name=gen_string('alpha', 15),
3939
url=settings.http_proxy.un_auth_proxy_url,
4040
organization=[org.id],
41-
default_content_http_proxy=True,
41+
content_default_http_proxy=True,
4242
).create()
4343
if http_proxy_type:
4444
return self._satellite.api.HTTPProxy(
@@ -47,7 +47,7 @@ def make_http_proxy(self, org, http_proxy_type):
4747
username=settings.http_proxy.username,
4848
password=settings.http_proxy.password,
4949
organization=[org.id],
50-
default_content_http_proxy=True,
50+
content_default_http_proxy=True,
5151
).create()
5252
return None
5353

tests/foreman/ui/test_http_proxy.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,16 +277,24 @@ def test_positive_set_default_http_proxy(
277277
{
278278
'http_proxy.name': http_proxy_name,
279279
'http_proxy.url': http_proxy_url,
280-
'http_proxy.default_content_http_proxy': 'true',
280+
'http_proxy.content_default_http_proxy': 'true',
281281
'locations.resources.assigned': [module_location.name],
282282
'organizations.resources.assigned': [module_org.name],
283283
}
284284
)
285-
request.addfinalizer(
286-
lambda: target_sat.api.HTTPProxy()
287-
.search(query={'search': f'name={http_proxy_name}'})[0]
288-
.delete()
289-
)
285+
286+
# Teardown
287+
@request.addfinalizer
288+
def _finalize():
289+
target_sat.api.HTTPProxy().search(query={'search': f'name={http_proxy_name}'})[
290+
0
291+
].delete()
292+
default_proxy = target_sat.api.Setting().search(
293+
query={'search': 'name=content_default_http_proxy'}
294+
)[0]
295+
assert default_proxy.value != http_proxy_name
296+
assert not default_proxy.value
297+
290298
result = session.settings.read(f'name = {property_name}')
291299
assert result['table'][0]['Value'] == f'{http_proxy_name} ({http_proxy_url})'
292300

0 commit comments

Comments
 (0)