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

Customer Case Automation - repo ids not being displayed #14400

Merged
merged 7 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 6 additions & 0 deletions robottelo/cli/contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,9 @@ def component_list(cls, options=None):
"""List components attached to the content view"""
cls.command_sub = 'component list'
return cls.execute(cls._construct_command(options), output_format='csv')

@classmethod
def list(cls, options=None):
"""List information about content views"""
cls.command_sub = 'list'
return cls.execute(cls._construct_command(options), output_format='csv')
40 changes: 40 additions & 0 deletions tests/foreman/cli/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -3304,6 +3304,46 @@ def test_version_info_by_lce(self, module_org, module_target_sat):
)
assert content_view['version'] == '1.0'

@pytest.mark.tier2
def test_show_all_repo_ids(self, module_org, module_product, module_target_sat):
"""Hammer content-view list shows all repo ids

:id: 56d716f1-85cf-47d7-a8e6-29788374d318

:steps:
1. Add a large number of repositories to a CV
2. Publish the CV
3. Run hammer content-view list

:expectedresults: All IDs for the repo are listed, and not truncated

:BZ: 2141421

:customerscenario: true
"""
# Create 30 repositories
repolist = []
id_list = []
for _ in range(30):
repo = module_target_sat.api.Repository(
product=module_product,
checksum_type='sha256',
mirroring_policy='additive',
download_policy='immediate',
).create()
repolist.append(repo)
id_list.append(str(repo.id))
# Sync and publish all repos
cv = module_target_sat.api.ContentView(
organization=module_org, repository=repolist
).create()
for repo in repolist:
repo.sync()
cv.publish()
# Run content-view list --name cv.name
list_info = module_target_sat.cli.ContentView.list({'name': cv.name})
assert (list_info[0]['repository-ids']) == ', '.join(id_list)
sambible marked this conversation as resolved.
Show resolved Hide resolved

def test_positive_validate_force_promote_warning(self, target_sat, function_org):
"""Test cv promote shows warning of 'force promotion' for out of sequence LCE

Expand Down