From 3b0e1fa9bb440487724770127dc4d4fa715856cc Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:40:24 -0500 Subject: [PATCH] [6.16.z] Update test_negative_health_check_upstream_repository (#17028) --- tests/foreman/maintain/test_health.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/foreman/maintain/test_health.py b/tests/foreman/maintain/test_health.py index cac9ea091d6..9578604b51e 100644 --- a/tests/foreman/maintain/test_health.py +++ b/tests/foreman/maintain/test_health.py @@ -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/', } @@ -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):