Skip to content

Commit

Permalink
Update test_negative_health_check_upstream_repository (#17025)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2709932)
  • Loading branch information
jameerpathan111 authored and web-flow committed Nov 29, 2024
1 parent 806cbcc commit e249fcb
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/foreman/maintain/test_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
from robottelo.utils.installer import InstallerCommand

upstream_url = {
'foreman_repo': 'https://yum.theforeman.org/releases/nightly/el8/x86_64/',
'puppet_repo': 'https://yum.puppetlabs.com/puppet/el/8/x86_64/',
'fedorapeople_repo': (
'https://fedorapeople.org/groups/katello/releases/yum/latest/candlepin/el7/x86_64/'
),
'foreman_repo': 'https://yum.theforeman.org/releases/nightly/el9/x86_64/',
'puppet_repo': 'https://yum.puppetlabs.com/puppet/el/9/x86_64/',
'katello_repo': 'https://yum.theforeman.org/katello/nightly/katello/el9/x86_64/',
}


Expand Down Expand Up @@ -215,14 +213,14 @@ def _finalize():
options={'label': 'check-upstream-repository', 'assumeyes': True}
)
assert result.status == 0
assert 'System has upstream foreman_repo,puppet_repo repositories enabled' in result.stdout
assert (
f"System has upstream {','.join(sorted([ name for name in upstream_url ]))} repositories enabled"
in result.stdout
)
assert 'FAIL' in result.stdout
for name in upstream_url:
result = sat_maintain.execute(f'cat /etc/yum.repos.d/{name}.repo')
if name == 'fedorapeople_repo':
assert 'enabled=1' in result.stdout
elif name in ['foreman_repo', 'puppet_repo']:
assert 'enabled=0' in result.stdout
assert 'enabled=0' in result.stdout


def test_positive_health_check_available_space(sat_maintain):
Expand Down

0 comments on commit e249fcb

Please sign in to comment.