From 23d86796c25fa25f85996bf226768a67ba6c135a Mon Sep 17 00:00:00 2001 From: Vladimir Sedmik Date: Mon, 8 Apr 2024 12:00:28 +0200 Subject: [PATCH] Get rid of deprecated DRPM repo tests --- robottelo/constants/repos.py | 2 +- tests/foreman/api/test_notifications.py | 2 +- tests/foreman/cli/test_repository.py | 88 ------------------------- 3 files changed, 2 insertions(+), 90 deletions(-) diff --git a/robottelo/constants/repos.py b/robottelo/constants/repos.py index a0b2a8adeec..f17ecde014a 100644 --- a/robottelo/constants/repos.py +++ b/robottelo/constants/repos.py @@ -12,7 +12,7 @@ CUSTOM_RPM_SHA = 'https://fixtures.pulpproject.org/rpm-with-sha/' CUSTOM_RPM_SHA_512 = 'https://fixtures.pulpproject.org/rpm-with-sha-512/' FAKE_5_YUM_REPO = 'https://rplevka.fedorapeople.org/fakerepo01/' -FAKE_YUM_DRPM_REPO = 'https://fixtures.pulpproject.org/drpm-signed/' +FAKE_YUM_MISSING_REPO = 'https://fixtures.pulpproject.org/missing-signed/' FAKE_YUM_SRPM_REPO = 'https://fixtures.pulpproject.org/srpm-signed/' FAKE_YUM_SRPM_DUPLICATE_REPO = 'https://fixtures.pulpproject.org/srpm-duplicate/' FAKE_YUM_MD5_REPO = 'https://fixtures.pulpproject.org/rpm-with-md5/' diff --git a/tests/foreman/api/test_notifications.py b/tests/foreman/api/test_notifications.py index 4a43be0084e..72749d57520 100644 --- a/tests/foreman/api/test_notifications.py +++ b/tests/foreman/api/test_notifications.py @@ -222,7 +222,7 @@ def long_running_task(target_sat): def fake_yum_repo(target_sat): """Create a fake YUM repo. Delete it afterwards.""" repo = target_sat.api.Repository( - content_type='yum', url=repo_constants.FAKE_YUM_DRPM_REPO + content_type='yum', url=repo_constants.FAKE_YUM_MISSING_REPO ).create() yield repo diff --git a/tests/foreman/cli/test_repository.py b/tests/foreman/cli/test_repository.py index db04dfd3305..4a70086781f 100644 --- a/tests/foreman/cli/test_repository.py +++ b/tests/foreman/cli/test_repository.py @@ -41,7 +41,6 @@ CUSTOM_FILE_REPO, CUSTOM_RPM_SHA, FAKE_5_YUM_REPO, - FAKE_YUM_DRPM_REPO, FAKE_YUM_MD5_REPO, FAKE_YUM_SRPM_REPO, ) @@ -2529,93 +2528,6 @@ def test_positive_sync_publish_promote_cv(self, repo, module_org, target_sat): assert lce['id'] in [lc['id'] for lc in cv['lifecycle-environments']] -@pytest.mark.skip_if_open("BZ:1682951") -class TestDRPMRepository: - """Tests specific to using repositories containing delta RPMs.""" - - @pytest.mark.tier2 - @pytest.mark.skip("Uses deprecated DRPM repository") - @pytest.mark.parametrize( - 'repo_options', **parametrized([{'url': FAKE_YUM_DRPM_REPO}]), indirect=True - ) - def test_positive_sync(self, repo, module_org, module_product, target_sat): - """Synchronize repository with DRPMs - - :id: a645966c-750b-40ef-a264-dc3bb632b9fd - - :parametrized: yes - - :expectedresults: drpms can be listed in repository - """ - target_sat.cli.Repository.synchronize({'id': repo['id']}) - result = target_sat.execute( - f"ls /var/lib/pulp/published/yum/https/repos/{module_org.label}/Library" - f"/custom/{module_product.label}/{repo['label']}/drpms/ | grep .drpm" - ) - assert result.status == 0 - assert result.stdout - - @pytest.mark.tier2 - @pytest.mark.skip("Uses deprecated DRPM repository") - @pytest.mark.parametrize( - 'repo_options', **parametrized([{'url': FAKE_YUM_DRPM_REPO}]), indirect=True - ) - def test_positive_sync_publish_cv(self, repo, module_org, module_product, target_sat): - """Synchronize repository with DRPMs, add repository to content view - and publish content view - - :id: 014bfc80-4622-422e-a0ec-755b1d9f845e - - :parametrized: yes - - :expectedresults: drpms can be listed in content view - """ - target_sat.cli.Repository.synchronize({'id': repo['id']}) - cv = target_sat.cli_factory.make_content_view({'organization-id': module_org.id}) - target_sat.cli.ContentView.add_repository({'id': cv['id'], 'repository-id': repo['id']}) - target_sat.cli.ContentView.publish({'id': cv['id']}) - result = target_sat.execute( - f"ls /var/lib/pulp/published/yum/https/repos/{module_org.label}/content_views/" - f"{cv['label']}/1.0/custom/{module_product.label}/{repo['label']}/drpms/ | grep .drpm" - ) - assert result.status == 0 - assert result.stdout - - @pytest.mark.tier2 - @pytest.mark.upgrade - @pytest.mark.skip("Uses deprecated DRPM repository") - @pytest.mark.parametrize( - 'repo_options', **parametrized([{'url': FAKE_YUM_DRPM_REPO}]), indirect=True - ) - def test_positive_sync_publish_promote_cv(self, repo, module_org, module_product, target_sat): - """Synchronize repository with DRPMs, add repository to content view, - publish and promote content view to lifecycle environment - - :id: a01cb12b-d388-4902-8532-714f4e28ec56 - - :parametrized: yes - - :expectedresults: drpms can be listed in content view in proper - lifecycle environment - """ - lce = target_sat.cli_factory.make_lifecycle_environment({'organization-id': module_org.id}) - target_sat.cli.Repository.synchronize({'id': repo['id']}) - cv = target_sat.cli_factory.make_content_view({'organization-id': module_org.id}) - target_sat.cli.ContentView.add_repository({'id': cv['id'], 'repository-id': repo['id']}) - target_sat.cli.ContentView.publish({'id': cv['id']}) - content_view = target_sat.cli.ContentView.info({'id': cv['id']}) - cvv = content_view['versions'][0] - target_sat.cli.ContentView.version_promote( - {'id': cvv['id'], 'to-lifecycle-environment-id': lce['id']} - ) - result = target_sat.execute( - f"ls /var/lib/pulp/published/yum/https/repos/{module_org.label}/{lce['label']}" - f"/{cv['label']}/custom/{module_product.label}/{repo['label']}/drpms/ | grep .drpm" - ) - assert result.status == 0 - assert result.stdout - - class TestFileRepository: """Specific tests for File Repositories"""