From 68638084ab35538ed2eba5fe9516057d22daba5c Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Wed, 13 Mar 2024 17:47:28 +0100 Subject: [PATCH 1/2] changes in test_positive_run_job_on_host_converted_to_pull_provider (#14394) --- tests/foreman/cli/test_remoteexecution.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/foreman/cli/test_remoteexecution.py b/tests/foreman/cli/test_remoteexecution.py index 3f530054359..d892b4dbb4a 100644 --- a/tests/foreman/cli/test_remoteexecution.py +++ b/tests/foreman/cli/test_remoteexecution.py @@ -1302,15 +1302,11 @@ def test_positive_run_job_on_host_converted_to_pull_provider( assert_job_invocation_result( module_target_sat, invocation_command['id'], rhel_contenthost.hostname ) - # check katello-agent runs along ygdrassil (SAT-1671) - result = rhel_contenthost.execute('systemctl status goferd') - assert result.status == 0, 'Failed to start goferd on client' - # run Ansible rex command to prove ssh provider works, remove katello-agent invocation_command = module_target_sat.cli_factory.job_invocation( { - 'job-template': 'Package Action - Ansible Default', - 'inputs': 'state=absent, name=katello-agent', + 'job-template': 'Remove Package - Katello Script Default', + 'inputs': 'package=katello-agent', 'search-query': f"name ~ {rhel_contenthost.hostname}", } ) From c201a00f06beefcd1d4991946600ff7d14dde014 Mon Sep 17 00:00:00 2001 From: Sam Bible Date: Wed, 13 Mar 2024 17:08:36 -0500 Subject: [PATCH 2/2] Customer Case Automation - repo ids not being displayed --- robottelo/cli/contentview.py | 6 ++++ tests/foreman/cli/test_contentview.py | 41 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/robottelo/cli/contentview.py b/robottelo/cli/contentview.py index fb8001f89d7..157464ba804 100644 --- a/robottelo/cli/contentview.py +++ b/robottelo/cli/contentview.py @@ -208,3 +208,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 components attached to the content view""" + cls.command_sub = 'list' + return cls.execute(cls._construct_command(options), output_format='csv') diff --git a/tests/foreman/cli/test_contentview.py b/tests/foreman/cli/test_contentview.py index 9b261f57218..137730fd95e 100644 --- a/tests/foreman/cli/test_contentview.py +++ b/tests/foreman/cli/test_contentview.py @@ -4065,6 +4065,47 @@ 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 _i 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)) + id_list = ', '.join(id_list) + # 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']) == id_list + class TestContentViewFileRepo: """Specific tests for Content Views with File Repositories containing