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

Remove rhsc7 check from robottelo #17443

Merged
merged 1 commit into from
Jan 28, 2025
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: 0 additions & 10 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@
'rhva6': ('Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)'),
'rhs7': 'Red Hat Satellite 6.11 (for RHEL 7 Server) (RPMs)',
'rhs8': 'Red Hat Satellite 6.13 for RHEL 8 x86_64 (RPMs)',
'rhsc7': 'Red Hat Satellite Capsule 6.16 (for RHEL 7 Server) (RPMs)',
'rhsc8': 'Red Hat Satellite Capsule 6.16 for RHEL 8 x86_64 (RPMs)',
'rhsc9': 'Red Hat Satellite Capsule 6.16 for RHEL 9 x86_64 (RPMs)',
'rhsc7_iso': 'Red Hat Satellite Capsule 6.4 (for RHEL 7 Server) (ISOs)',
Expand Down Expand Up @@ -411,15 +410,6 @@
'distro': 'rhel7',
'key': 'rhs',
},
'rhsc7': {
'id': 'rhel-7-server-satellite-capsule-6.16-rpms',
'name': ('Red Hat Satellite Capsule 6.16 for RHEL 7 Server RPMs x86_64'),
'version': '6.16',
'reposet': REPOSET['rhsc7'],
'product': PRDS['rhsc'],
'distro': 'rhel7',
'key': 'rhsc',
},
'rhsc8': {
'id': 'satellite-capsule-6.16-for-rhel-8-x86_64-rpms',
'name': ('Red Hat Satellite Capsule 6.16 for RHEL 8 x86_64 RPMs'),
Expand Down
47 changes: 0 additions & 47 deletions robottelo/host_helpers/cli_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,53 +922,6 @@ def setup_org_for_a_rh_repo(
)
return result

@staticmethod
def _get_capsule_vm_distro_repos(distro):
"""Return the right RH repos info for the capsule setup"""
rh_repos = []
if distro == 'rhel7':
# Red Hat Enterprise Linux 7 Server
rh_product_arch = constants.REPOS['rhel7']['arch']
rh_product_releasever = constants.REPOS['rhel7']['releasever']
rh_repos.append(
{
'product': constants.PRDS['rhel'],
'repository-set': constants.REPOSET['rhel7'],
'repository': constants.REPOS['rhel7']['name'],
'repository-id': constants.REPOS['rhel7']['id'],
'releasever': rh_product_releasever,
'arch': rh_product_arch,
'cdn': True,
}
)
# Red Hat Software Collections (for 7 Server)
rh_repos.append(
{
'product': constants.PRDS['rhscl'],
'repository-set': constants.REPOSET['rhscl7'],
'repository': constants.REPOS['rhscl7']['name'],
'repository-id': constants.REPOS['rhscl7']['id'],
'releasever': rh_product_releasever,
'arch': rh_product_arch,
'cdn': True,
}
)
# Red Hat Satellite Capsule 6.2 (for RHEL 7 Server)
rh_repos.append(
{
'product': constants.PRDS['rhsc'],
'repository-set': constants.REPOSET['rhsc7'],
'repository': constants.REPOS['rhsc7']['name'],
'repository-id': constants.REPOS['rhsc7']['id'],
'url': settings.repos.capsule_repo,
'cdn': settings.robottelo.cdn or not settings.repos.capsule_repo,
}
)
else:
raise CLIFactoryError(f'distro "{distro}" not supported')

return rh_product_arch, rh_product_releasever, rh_repos

def add_role_permissions(self, role_id, resource_permissions):
"""Create role permissions found in resource permissions dict

Expand Down
2 changes: 1 addition & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def enable_repo(self, repo, force=False):
downstream_repo = settings.repos.sattools_repo['rhel7']
elif repo == constants.REPOS['rhst8']['id']:
downstream_repo = settings.repos.sattools_repo['rhel8']
elif repo in (constants.REPOS['rhsc7']['id'], constants.REPOS['rhsc8']['id']):
Gauravtalreja1 marked this conversation as resolved.
Show resolved Hide resolved
elif repo in (constants.REPOS['rhsc8']['id'], constants.REPOS['rhsc9']['id']):
downstream_repo = settings.repos.capsule_repo
if force or settings.robottelo.cdn or not downstream_repo:
return self.execute(f'subscription-manager repos --enable {repo}')
Expand Down
21 changes: 14 additions & 7 deletions tests/foreman/ui/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
import pytest

from robottelo.config import settings
from robottelo.constants import DEFAULT_LOC, PRDS, REPOS, REPOSET, RPM_TO_UPLOAD, DataFile
from robottelo.constants import (
DEFAULT_ARCHITECTURE,
DEFAULT_LOC,
PRDS,
REPOS,
REPOSET,
RPM_TO_UPLOAD,
DataFile,
)


@pytest.fixture(scope='module')
Expand Down Expand Up @@ -55,14 +63,13 @@ def module_yum_repo2(module_product, module_target_sat):

@pytest.fixture(scope='module')
def module_rh_repo(module_sca_manifest_org, module_target_sat):
rhsc = module_target_sat.cli_factory.SatelliteCapsuleRepository(cdn=True)
repo_id = module_target_sat.api_factory.enable_rhrepo_and_fetchid(
basearch=rhsc.data['arch'],
basearch=DEFAULT_ARCHITECTURE,
org_id=module_sca_manifest_org.id,
product=rhsc.data['product'],
repo=rhsc.data['repository'],
reposet=rhsc.data['repository-set'],
releasever=rhsc.data['releasever'],
product=REPOS['rhsc9']['product'],
repo=REPOS['rhsc9']['name'],
reposet=REPOSET['rhsc9'],
releasever=REPOS['rhsc9']['version'],
)
module_target_sat.api.Repository(id=repo_id).sync()
return module_target_sat.api.Repository(id=repo_id).read()
Expand Down
Loading