Skip to content

Commit

Permalink
Stream fix for e2e api http_proxy failure (SatelliteQE#13064)
Browse files Browse the repository at this point in the history
* Stream fix for e2e http_proxy failure

* Lastest prt failure, now seeing same issue with rh_repo

* Repo discovery fix
  • Loading branch information
damoore044 authored Nov 16, 2023
1 parent e208153 commit 6e804fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/foreman/api/test_http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def test_positive_end_to_end(setup_http_proxy, module_target_sat, module_manifes
reposet=constants.REPOSET['rhae2'],
releasever=None,
)
module_target_sat.api.Repository(id=rh_repo_id).sync()
rh_repo = module_target_sat.api.Repository(
id=rh_repo_id,
http_proxy_policy=http_proxy_policy,
Expand Down Expand Up @@ -96,12 +97,13 @@ def test_positive_end_to_end(setup_http_proxy, module_target_sat, module_manifes
# Use global_default_http_proxy
repo_options['http_proxy_policy'] = 'global_default_http_proxy'
repo_2 = module_target_sat.api.Repository(**repo_options).create()
repo_2.sync()
assert repo_2.http_proxy_policy == 'global_default_http_proxy'

# Update to selected_http_proxy
repo_2.http_proxy_policy = 'none'
repo_2.update(['http_proxy_policy'])
assert repo_2.http_proxy_policy == 'none'
assert repo_2.read().http_proxy_policy == 'none'

# test scenario for yum type repo discovery.
repo_name = 'fakerepo01'
Expand All @@ -116,16 +118,16 @@ def test_positive_end_to_end(setup_http_proxy, module_target_sat, module_manifes
assert yum_repo['output'][0] == f'{settings.repos.repo_discovery.url}/{repo_name}/'

# test scenario for docker type repo discovery.
yum_repo = module_target_sat.api.Organization(id=module_manifest_org.id).repo_discover(
docker_repo = module_target_sat.api.Organization(id=module_manifest_org.id).repo_discover(
data={
"id": module_manifest_org.id,
"url": 'quay.io',
"content_type": "docker",
"search": 'quay/busybox',
"search": 'foreman/foreman',
}
)
assert len(yum_repo['output']) >= 1
assert 'quay/busybox' in yum_repo['output']
assert len(docker_repo['output']) > 0
assert docker_repo['result'] == 'success'


@pytest.mark.upgrade
Expand Down

0 comments on commit 6e804fa

Please sign in to comment.