From 1f14ef3ebf469d2210e716b4ba3e205db6e179f1 Mon Sep 17 00:00:00 2001 From: Jameer Pathan <21165044+jameerpathan111@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:37:13 +0100 Subject: [PATCH] Update test_negative_health_check_upstream_repository (#17025) (cherry picked from commit 270993235248bedcebc191ec7180a68d15966391) --- 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 8c251314b1a..ca19cab9f64 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):