File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1414from traitlets .config import LoggingConfigurable
1515
1616DEFAULT_DOCKER_REGISTRY_URL = "https://registry-1.docker.io"
17- DEFAULT_DOCKER_AUTH_URL = "https://index.docker.io/v1"
17+ DEFAULT_DOCKER_AUTH_URL = "https://index.docker.io/v1/ "
1818
1919
2020class DockerRegistry (LoggingConfigurable ):
@@ -46,7 +46,7 @@ def _default_url(self):
4646 # which assumes https
4747 auth_config_url = "https://" + auth_config_url
4848
49- if auth_config_url . rstrip ( "/" ) == DEFAULT_DOCKER_AUTH_URL :
49+ if auth_config_url == DEFAULT_DOCKER_AUTH_URL :
5050 # default docker config key is the v1 registry,
5151 # but we will talk to the v2 api
5252 return DEFAULT_DOCKER_REGISTRY_URL
Original file line number Diff line number Diff line change 1515def test_registry_defaults (tmpdir ):
1616 registry = DockerRegistry (docker_config_path = str (tmpdir .join ("doesntexist.json" )))
1717 assert registry .url == "https://registry-1.docker.io"
18- assert registry .auth_config_url == "https://index.docker.io/v1"
18+ assert registry .auth_config_url == "https://index.docker.io/v1/ "
1919 assert (
2020 registry .token_url == "https://auth.docker.io/token?service=registry.docker.io"
2121 )
@@ -29,7 +29,7 @@ def test_registry_username_password(tmpdir):
2929 json .dump (
3030 {
3131 "auths" : {
32- "https://index.docker.io/v1" : {
32+ "https://index.docker.io/v1/ " : {
3333 "auth" : base64 .encodebytes (b"user:pass" ).decode ("ascii" )
3434 }
3535 }
You can’t perform that action at this time.
0 commit comments