From e94158a7ad3d5f41f257c8e11a6ec46de31b9d2a Mon Sep 17 00:00:00 2001 From: vijay sawant Date: Wed, 28 Feb 2024 19:47:34 +0530 Subject: [PATCH 1/2] add test steps, refresh uploaded manifest file (#14195) --- tests/foreman/api/test_repository.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/foreman/api/test_repository.py b/tests/foreman/api/test_repository.py index 367570f7ef7..897c27d5f53 100644 --- a/tests/foreman/api/test_repository.py +++ b/tests/foreman/api/test_repository.py @@ -1521,14 +1521,22 @@ def test_positive_sync_kickstart_check_os( ), indirect=True, ) - def test_missing_content_id(self, repo): + def test_missing_content_id(self, repo, function_sca_manifest_org, target_sat): """Handle several cases of missing content ID correctly :id: f507790a-933b-4b3f-ac93-cade6967fbd2 :parametrized: yes - :expectedresults: Repository URL can be set to something new and the repo can be deleted + :setup: + 1. Create product and repo, sync repo + + :steps: + 1. Try to update repo URL + 2. Attempt to delete repo + 3. Refresh manifest file + + :expectedresults: Repo URL can be updated, repo can be deleted and manifest refresh works after repo delete :BZ:2032040 """ @@ -1546,6 +1554,10 @@ def test_missing_content_id(self, repo): repo.delete() with pytest.raises(HTTPError): repo.read() + output = target_sat.cli.Subscription.refresh_manifest( + {'organization-id': function_sca_manifest_org.id} + ) + assert 'Candlepin job status: SUCCESS' in output, 'Failed to refresh manifest' class TestDockerRepository: From b83e4f4999042df8a211a027f80a053a09a6273d Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Wed, 28 Feb 2024 15:57:28 +0100 Subject: [PATCH 2/2] host package_list fix (#13989) --- robottelo/cli/hammer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/robottelo/cli/hammer.py b/robottelo/cli/hammer.py index dcc2468ba7c..0471754002f 100644 --- a/robottelo/cli/hammer.py +++ b/robottelo/cli/hammer.py @@ -49,8 +49,9 @@ def parse_csv(output): # ignore warning about puppet and ostree deprecation output.replace('Puppet and OSTree will no longer be supported in Katello 3.16\n', '') is_rex = True if 'Job invocation' in output else False + is_pkg_list = True if 'Nvra' in output else False # Validate if the output is eligible for CSV conversions else return as it is - if not is_csv(output) and not is_rex: + if not is_csv(output) and not is_rex and not is_pkg_list: return output output = output.splitlines()[0:2] if is_rex else output.splitlines() reader = csv.reader(output)