Skip to content

Commit

Permalink
Add test to sync/publish DRPM/SRPM
Browse files Browse the repository at this point in the history
Add test to sync/publish DRPM/SRPM content.

https://pulp.plan.io/issues/4108
ref: #4108
  • Loading branch information
koliveir authored and rochacbruno committed Feb 18, 2019
1 parent c1c8f1e commit bda2a6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pulp_rpm/tests/functional/api/test_publish.py
Expand Up @@ -22,6 +22,7 @@
gen_rpm_remote,
)
from pulp_rpm.tests.functional.constants import (
DRPM_UNSIGNED_FIXTURE_URL,
RPM_ALT_LAYOUT_FIXTURE_URL,
RPM_FIXTURE_SUMMARY,
RPM_LONG_UPDATEINFO_FIXTURE_URL,
Expand All @@ -31,6 +32,7 @@
RPM_REMOTE_PATH,
RPM_RICH_WEAK_FIXTURE_URL,
RPM_SHA512_FIXTURE_URL,
SRPM_UNSIGNED_FIXTURE_URL,
)
from pulp_rpm.tests.functional.utils import set_up_module as setUpModule # noqa:F401

Expand Down Expand Up @@ -154,6 +156,7 @@ class SyncPublishTestCase(unittest.TestCase):
This test targets the following issue:
`Pulp #4108 <https://pulp.plan.io/issues/4108>`_.
`Pulp #4134 <https://pulp.plan.io/issues/4134>`_.
"""

Expand All @@ -179,6 +182,14 @@ def test_rpm_sha512(self):
"""Sync and publish an RPM repository. See :meth: `do_test`."""
self.do_test(RPM_SHA512_FIXTURE_URL)

def test_srpm(self):
"""Sync and publish a SRPM repository. See :meth: `do_test`."""
self.do_test(SRPM_UNSIGNED_FIXTURE_URL)

def test_drpm(self):
"""Sync and publish a DRPM repository. See :meth: `do_test`."""
self.do_test(DRPM_UNSIGNED_FIXTURE_URL)

def do_test(self, url):
"""Sync and publish an RPM repository given a feed URL."""
repo = self.client.post(REPO_PATH, gen_repo())
Expand Down
6 changes: 6 additions & 0 deletions pulp_rpm/tests/functional/constants.py
Expand Up @@ -9,6 +9,9 @@
CONTENT_PATH,
)

DRPM_UNSIGNED_FIXTURE_URL = urljoin(PULP_FIXTURES_BASE_URL, 'drpm-unsigned/')
"""The URL to a repository with unsigned DRPM packages."""

RPM_PACKAGE_CONTENT_NAME = 'rpm.package'

RPM_UPDATE_CONTENT_NAME = 'rpm.update'
Expand Down Expand Up @@ -143,5 +146,8 @@
)
"""The URL to an RPM with non-UTF-8 metadata in its header."""

SRPM_UNSIGNED_FIXTURE_URL = urljoin(PULP_FIXTURES_BASE_URL, 'srpm-unsigned/')
"""The URL to a repository with unsigned SRPM packages."""

UPDATERECORD_CONTENT_PATH = urljoin(CONTENT_PATH, 'rpm/updates/')
"""The location of RPM UpdateRecords on the content endpoint."""

0 comments on commit bda2a6a

Please sign in to comment.