Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.14.z] Add test to ensure katello-agent availability in Client repos #12988

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ class Colored(Box):
'rhsc7': 'Red Hat Satellite Capsule 6.11 (for RHEL 7 Server) (RPMs)',
'rhsc8': 'Red Hat Satellite Capsule 6.13 for RHEL 8 x86_64 (RPMs)',
'rhsc7_iso': 'Red Hat Satellite Capsule 6.4 (for RHEL 7 Server) (ISOs)',
'rhsclient7': 'Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64',
'rhsclient8': 'Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs',
'rhsclient9': 'Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs',
'rhsclient7': 'Red Hat Satellite Client 6 (for RHEL 7 Server) (RPMs)',
'rhsclient8': 'Red Hat Satellite Client 6 for RHEL 8 x86_64 (RPMs)',
'rhsclient9': 'Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs)',
'rhst7': 'Red Hat Satellite Tools 6.9 (for RHEL 7 Server) (RPMs)',
'rhst7_610': 'Red Hat Satellite Tools 6.10 (for RHEL 7 Server) (RPMs)',
'rhst6': 'Red Hat Satellite Tools 6.9 (for RHEL 6 Server) (RPMs)',
Expand Down Expand Up @@ -408,7 +408,7 @@ class Colored(Box):
'name': ('Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs'),
'version': '6',
'reposet': REPOSET['rhsclient8'],
'product': PRDS['rhel'],
'product': PRDS['rhel8'],
'distro': 'rhel8',
'key': PRODUCT_KEY_SAT_CLIENT,
},
Expand All @@ -417,7 +417,7 @@ class Colored(Box):
'name': ('Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs'),
'version': '6',
'reposet': REPOSET['rhsclient9'],
'product': PRDS['rhel'],
'product': PRDS['rhel9'],
'distro': 'rhel9',
'key': PRODUCT_KEY_SAT_CLIENT,
},
Expand Down
36 changes: 36 additions & 0 deletions tests/foreman/api/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,42 @@ def test_positive_sync_with_treeinfo_ignore(
f'{repo.full_path}.treeinfo'
), 'The treeinfo file is missing in the KS repo but it should be there.'

@pytest.mark.tier3
@pytest.mark.parametrize('client_repo', ['rhsclient7', 'rhsclient8', 'rhsclient9'])
def test_positive_katello_agent_availability(
self, target_sat, function_sca_manifest_org, client_repo
):
"""Verify katello-agent package remains available in the RH Satellite Client repos
for older Satellite versions (Sat 6.14 is the last one supporting it).

:id: cd5b4e5b-e4f1-4d00-b171-30cd5b1e7ce8

:parametrized: yes

:steps:
1. Enable RH Satellite Client repo and sync it.
2. Read the repo packages.

:expectedresults:
1. Katello-agent remains available in the Client repos.

"""
# Enable RH Satellite Client repo and sync it.
repo_id = target_sat.api_factory.enable_rhrepo_and_fetchid(
basearch='x86_64',
org_id=function_sca_manifest_org.id,
product=constants.REPOS[client_repo]['product'],
reposet=constants.REPOS[client_repo]['reposet'],
repo=constants.REPOS[client_repo]['name'],
releasever=constants.REPOS[client_repo]['version'],
)
repo = target_sat.api.Repository(id=repo_id).read()
repo.sync()
# Make sure katello-agent lives in the repo happily.
repo_pkgs = target_sat.api.Repository(id=repo_id).packages()['results']
agent_pkgs = [pkg['filename'] for pkg in repo_pkgs if 'katello-agent' in pkg['name']]
assert len(agent_pkgs), 'Katello-agent package is missing from the RH Client repo!'


@pytest.mark.run_in_one_thread
class TestRepositorySync:
Expand Down