Skip to content

Commit

Permalink
Fix SRPM repo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik committed Apr 9, 2024
1 parent 23d8679 commit 541d4f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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_MISSING_REPO = 'https://fixtures.pulpproject.org/missing-signed/'
FAKE_YUM_MISSING_REPO = 'https://fixtures.pulpproject.org/missing-repo/'
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
15 changes: 4 additions & 11 deletions tests/foreman/api/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ def repo_options_custom_product(request, module_org, module_target_sat):
return options


@pytest.fixture
def env(module_org, module_target_sat):
"""Create a new puppet environment."""
return module_target_sat.api.Environment(organization=[module_org]).create()


@pytest.fixture
def repo(repo_options, module_target_sat):
"""Create a new repository."""
Expand Down Expand Up @@ -2098,7 +2092,7 @@ class TestSRPMRepository:
@pytest.mark.upgrade
@pytest.mark.tier2
def test_positive_srpm_upload_publish_promote_cv(
self, module_org, env, repo, module_target_sat
self, module_org, module_lce, repo, module_target_sat
):
"""Upload SRPM to repository, add repository to content view
and publish, promote content view
Expand Down Expand Up @@ -2132,7 +2126,6 @@ def test_positive_srpm_upload_publish_promote_cv(

@pytest.mark.upgrade
@pytest.mark.tier2
@pytest.mark.skip('Uses deprecated SRPM repository')
@pytest.mark.skipif(
(not settings.robottelo.REPOS_HOSTING_URL), reason='Missing repos_hosting_url'
)
Expand All @@ -2141,7 +2134,7 @@ def test_positive_srpm_upload_publish_promote_cv(
**datafactory.parametrized({'fake_srpm': {'url': repo_constants.FAKE_YUM_SRPM_REPO}}),
indirect=True,
)
def test_positive_repo_sync_publish_promote_cv(self, module_org, env, repo, target_sat):
def test_positive_repo_sync_publish_promote_cv(self, module_org, module_lce, repo, target_sat):
"""Synchronize repository with SRPMs, add repository to content view
and publish, promote content view
Expand All @@ -2165,8 +2158,8 @@ def test_positive_repo_sync_publish_promote_cv(self, module_org, env, repo, targ
>= 3
)

cv.version[0].promote(data={'environment_ids': env.id, 'force': False})
assert len(target_sat.api.Srpms().search(query={'environment_id': env.id})) == 3
cv.version[0].promote(data={'environment_ids': module_lce.id, 'force': False})
assert len(target_sat.api.Srpms().search(query={'environment_id': module_lce.id})) >= 3


class TestSRPMRepositoryIgnoreContent:
Expand Down

0 comments on commit 541d4f9

Please sign in to comment.