diff --git a/pulp_smash/constants.py b/pulp_smash/constants.py index adea0f880..50439ef05 100644 --- a/pulp_smash/constants.py +++ b/pulp_smash/constants.py @@ -17,6 +17,18 @@ http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/content/upload.html#creating-an-upload-request """ +DOCKER_V1_FEED_URL = 'https://index.docker.io' +"""The URL to a V1 Docker registry. + +This URL can be used as the "feed" property of a Pulp Docker registry. +""" + +DOCKER_V2_FEED_URL = 'https://registry-1.docker.io' +"""The URL to a V2 Docker registry. + +This URL can be used as the "feed" property of a Pulp Docker registry. +""" + ERROR_KEYS = frozenset(( '_href', 'error', diff --git a/pulp_smash/tests/docker/cli/test_sync.py b/pulp_smash/tests/docker/cli/test_sync.py index 8f13191f4..440054bc1 100644 --- a/pulp_smash/tests/docker/cli/test_sync.py +++ b/pulp_smash/tests/docker/cli/test_sync.py @@ -6,6 +6,7 @@ from packaging.version import Version from pulp_smash import cli, config, selectors, utils +from pulp_smash.constants import DOCKER_V1_FEED_URL, DOCKER_V2_FEED_URL _CREATE_COMMAND = ( 'pulp-admin docker repo create ' @@ -64,7 +65,7 @@ def setUpClass(cls): """Create and sync a docker repository with a v1 registry.""" super(SyncV1TestCase, cls).setUpClass() kwargs = { - 'feed': 'https://index.docker.io', # v1 feed + 'feed': DOCKER_V1_FEED_URL, 'repo_id': cls.repo_id, 'upstream_name': _UPSTREAM_NAME, } @@ -86,7 +87,7 @@ def setUpClass(cls): if cls.cfg.version < Version('2.8'): raise unittest2.SkipTest('These tests require Pulp 2.8 or above.') kwargs = { - 'feed': 'https://registry-1.docker.io', # v2 feed + 'feed': DOCKER_V2_FEED_URL, 'repo_id': cls.repo_id, 'upstream_name': _UPSTREAM_NAME, } @@ -108,7 +109,7 @@ def setUpClass(cls): if cls.cfg.version < Version('2.8'): raise unittest2.SkipTest('These tests require Pulp 2.8 or above.') kwargs = { - 'feed': 'https://registry-1.docker.io', # v2 feed + 'feed': DOCKER_V2_FEED_URL, 'repo_id': cls.repo_id, 'upstream_name': 'busybox', }