Exemple #1
0
    def setUpClass(cls):
        """Create and sync a docker repository with a v2 registry."""
        super(CopyAllTagsTestCase, cls).setUpClass()
        if (cls.cfg.version >= Version('2.9') and
                selectors.bug_is_untestable(1909, cls.cfg.version)):
            raise unittest.SkipTest('https://pulp.plan.io/issues/1909')

        # Create a pair of repositories.
        docker_utils.repo_create(
            cls.cfg,
            enable_v1='false',
            enable_v2='true',
            feed=DOCKER_V2_FEED_URL,
            repo_id=cls.repo_ids[0],
            upstream_name=_UPSTREAM_NAME,
        )
        docker_utils.repo_create(cls.cfg, repo_id=cls.repo_ids[1])

        # Sync the first and copy some content units to the second.
        docker_utils.repo_sync(cls.cfg, cls.repo_ids[0])
        cls.copy = docker_utils.repo_copy(
            cls.cfg,
            unit_type='tag',
            from_repo_id=cls.repo_ids[0],
            to_repo_id=cls.repo_ids[1],
        )
Exemple #2
0
    def setUpClass(cls):
        """Create and sync a docker repository with a v2 registry."""
        super(CopyAllTagsTestCase, cls).setUpClass()
        if (cls.cfg.version >= Version('2.9')
                and selectors.bug_is_untestable(1909, cls.cfg.version)):
            raise unittest.SkipTest('https://pulp.plan.io/issues/1909')

        # Create a pair of repositories.
        docker_utils.repo_create(
            cls.cfg,
            enable_v1='false',
            enable_v2='true',
            feed=DOCKER_V2_FEED_URL,
            repo_id=cls.repo_ids[0],
            upstream_name=_UPSTREAM_NAME,
        )
        docker_utils.repo_create(cls.cfg, repo_id=cls.repo_ids[1])

        # Sync the first and copy some content units to the second.
        docker_utils.repo_sync(cls.cfg, cls.repo_ids[0])
        cls.copy = docker_utils.repo_copy(
            cls.cfg,
            unit_type='tag',
            from_repo_id=cls.repo_ids[0],
            to_repo_id=cls.repo_ids[1],
        )
    def setUpClass(cls):
        """Create and sync a docker repository with a v2 registry.

        After doing the above, read the repository's JSON app file, tags, and
        the manifest of the first tag.

        This method requires Pulp 2.8 and above, and will raise a ``SkipTest``
        exception if run against an earlier version of Pulp.
        """
        super(SyncPublishV2TestCase, cls).setUpClass()
        if cls.cfg.version < Version('2.8'):
            raise unittest.SkipTest('These tests require Pulp 2.8 or above.')
        if (cls.cfg.version >= Version('2.9') and
                selectors.bug_is_untestable(1909, cls.cfg.version)):
            raise unittest.SkipTest('https://pulp.plan.io/issues/1909')
        if (cls.cfg.version >= Version('2.10') and
                selectors.bug_is_untestable(2287, cls.cfg.version)):
            raise unittest.SkipTest('https://pulp.plan.io/issues/2287')
        docker_utils.repo_create(
            cls.cfg,
            feed=DOCKER_V2_FEED_URL,
            repo_id=cls.repo_id,
            upstream_name=DOCKER_UPSTREAM_NAME,
        )
        cls.completed_proc = docker_utils.repo_sync(cls.cfg, cls.repo_id)
        cls.app_file = _get_app_file(cls.cfg, cls.repo_id)
        cls.tags = _get_tags(cls.cfg, cls.repo_id)
        cls.manifest = _get_manifest(cls.cfg, cls.repo_id, cls.tags['tags'][0])
    def setUpClass(cls):
        """Provide a server config and a repository ID."""
        cls.cfg = config.get_config()

        if cls.cfg.version < version.Version('2.8'):
            raise unittest.SkipTest('These tests require Pulp 2.8 or above.')

        utils.pulp_admin_login(cls.cfg)

        cls.repo_id = utils.uuid4()
        docker_utils.repo_create(
            cls.cfg,
            enable_v2='true',
            repo_id=cls.repo_id,
        )
        docker_utils.repo_sync(cls.cfg, repo_id=cls.repo_id)
        cls.delete_cmd = docker_utils.repo_delete(cls.cfg, cls.repo_id)
Exemple #5
0
    def setUpClass(cls):
        """Provide a server config and a repository ID."""
        cls.cfg = config.get_config()

        if cls.cfg.version < version.Version('2.8'):
            raise unittest2.SkipTest('These tests require Pulp 2.8 or above.')

        utils.pulp_admin_login(cls.cfg)

        cls.repo_id = utils.uuid4()
        docker_utils.repo_create(
            cls.cfg,
            enable_v2='true',
            repo_id=cls.repo_id,
        )
        docker_utils.repo_sync(cls.cfg, repo_id=cls.repo_id)
        cls.delete_cmd = docker_utils.repo_delete(cls.cfg, cls.repo_id)
Exemple #6
0
 def setUpClass(cls):
     """Create and sync a docker repository with a v1 registry."""
     super(SyncV1TestCase, cls).setUpClass()
     docker_utils.repo_create(
         cls.cfg,
         feed=DOCKER_V1_FEED_URL,
         repo_id=cls.repo_id,
         upstream_name=_UPSTREAM_NAME,
     )
     cls.completed_proc = docker_utils.repo_sync(cls.cfg, cls.repo_id)
 def setUpClass(cls):
     """Create and sync a docker repository with a v1 registry."""
     super(SyncV1TestCase, cls).setUpClass()
     if (cls.cfg.version >= Version('2.9') and
             selectors.bug_is_untestable(1909, cls.cfg.version)):
         raise unittest.SkipTest('https://pulp.plan.io/issues/1909')
     docker_utils.repo_create(
         cls.cfg,
         feed=DOCKER_V1_FEED_URL,
         repo_id=cls.repo_id,
         upstream_name=DOCKER_UPSTREAM_NAME,
     )
     cls.completed_proc = docker_utils.repo_sync(cls.cfg, cls.repo_id)
Exemple #8
0
    def setUpClass(cls):
        """Create and sync a docker repository with a v1 registry."""
        super(CopyAllImagesTestCase, cls).setUpClass()

        # Create a pair of repositories.
        docker_utils.repo_create(
            cls.cfg,
            enable_v1='true',
            enable_v2='false',
            feed=DOCKER_V1_FEED_URL,
            repo_id=cls.repo_ids[0],
            upstream_name=_UPSTREAM_NAME,
        )
        docker_utils.repo_create(cls.cfg, repo_id=cls.repo_ids[1])

        # Sync the first and copy some content units to the second.
        docker_utils.repo_sync(cls.cfg, cls.repo_ids[0])
        cls.copy = docker_utils.repo_copy(
            cls.cfg,
            unit_type='image',
            from_repo_id=cls.repo_ids[0],
            to_repo_id=cls.repo_ids[1],
        )
Exemple #9
0
    def setUpClass(cls):
        """Create and sync a docker repository with a v2 registry."""
        super(CopyAllTagsTestCase, cls).setUpClass()

        # Create a pair of repositories.
        docker_utils.repo_create(
            cls.cfg,
            enable_v1='false',
            enable_v2='true',
            feed=DOCKER_V2_FEED_URL,
            repo_id=cls.repo_ids[0],
            upstream_name=_UPSTREAM_NAME,
        )
        docker_utils.repo_create(cls.cfg, repo_id=cls.repo_ids[1])

        # Sync the first and copy some content units to the second.
        docker_utils.repo_sync(cls.cfg, cls.repo_ids[0])
        cls.copy = docker_utils.repo_copy(
            cls.cfg,
            unit_type='tag',
            from_repo_id=cls.repo_ids[0],
            to_repo_id=cls.repo_ids[1],
        )
Exemple #10
0
    def setUpClass(cls):
        """Create a docker repository from an unnamespaced v2 registry.

        This method requires Pulp 2.8 and above, and will raise a ``SkipTest``
        exception if run against an earlier version of Pulp.
        """
        super(SyncUnnamespacedV2TestCase, cls).setUpClass()
        if cls.cfg.version < Version('2.8'):
            raise unittest2.SkipTest('These tests require Pulp 2.8 or above.')
        docker_utils.repo_create(
            cls.cfg,
            feed=DOCKER_V2_FEED_URL,
            repo_id=cls.repo_id,
            upstream_name=_UPSTREAM_NAME.split('/')[-1],  # drop 'library/'
        )
        cls.completed_proc = docker_utils.repo_sync(cls.cfg, cls.repo_id)
    def setUpClass(cls):
        """Create a docker repository from an unnamespaced v2 registry.

        This method requires Pulp 2.8 and above, and will raise a ``SkipTest``
        exception if run against an earlier version of Pulp.
        """
        super(SyncUnnamespacedV2TestCase, cls).setUpClass()
        if cls.cfg.version < Version('2.8'):
            raise unittest.SkipTest('These tests require Pulp 2.8 or above.')
        if (cls.cfg.version >= Version('2.9') and
                selectors.bug_is_untestable(1909, cls.cfg.version)):
            raise unittest.SkipTest('https://pulp.plan.io/issues/1909')
        # The split() drops 'library/'.
        docker_utils.repo_create(
            cls.cfg,
            feed=DOCKER_V2_FEED_URL,
            repo_id=cls.repo_id,
            upstream_name=DOCKER_UPSTREAM_NAME.split('/')[-1],
        )
        cls.completed_proc = docker_utils.repo_sync(cls.cfg, cls.repo_id)