Skip to content

Commit

Permalink
Get rid of deprecated DRPM repo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik committed Apr 8, 2024
1 parent f1799c9 commit 23d8679
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 90 deletions.
2 changes: 1 addition & 1 deletion robottelo/constants/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/api/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
88 changes: 0 additions & 88 deletions tests/foreman/cli/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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"""

Expand Down

0 comments on commit 23d8679

Please sign in to comment.