Exemplo n.º 1
0
    def test_registry_uris_param_v2(self):
        p = RegistryURIsParam()
        p.value = ['registry.example.com:5000/v2']

        assert p.value[0].uri == 'registry.example.com:5000'
        assert p.value[0].docker_uri == 'registry.example.com:5000'
        assert p.value[0].version == 'v2'
Exemplo n.º 2
0
    def test_registry_uris_param_v2(self):
        p = RegistryURIsParam()
        p.value = ['registry.example.com:5000/v2']

        assert p.value[0].uri == 'registry.example.com:5000'
        assert p.value[0].docker_uri == 'registry.example.com:5000'
        assert p.value[0].version == 'v2'
Exemplo n.º 3
0
    def test_registry_uris_param_api_implicit(self, suffix):
        p = RegistryURIsParam()
        p.value = ['registry.example.com:5000{suffix}'.format(suffix=suffix)]

        assert p.value[0].uri == 'registry.example.com:5000'
        assert p.value[0].docker_uri == 'registry.example.com:5000'
        assert p.value[0].version == 'v1'
Exemplo n.º 4
0
    def test_registry_uris_param_api_implicit(self, suffix):
        p = RegistryURIsParam()
        p.value = ['registry.example.com:5000{suffix}'.format(suffix=suffix)]

        assert p.value[0].uri == 'registry.example.com:5000'
        assert p.value[0].docker_uri == 'registry.example.com:5000'
        assert p.value[0].version == 'v1'