mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +05:30
registryurl: use designated domains in tests (RFC2606)
Update domains used in tests to used domains that are designated for this purpose as described in [RFC2606, section 3][1] [1]: https://www.rfc-editor.org/rfc/rfc2606.html#section-3 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
+16
-16
@@ -14,39 +14,39 @@ func TestHelperParseURL(t *testing.T) {
|
|||||||
err error
|
err error
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
url: "foobar.docker.io",
|
url: "foobar.example.com",
|
||||||
expectedURL: "//foobar.docker.io",
|
expectedURL: "//foobar.example.com",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "foobar.docker.io:2376",
|
url: "foobar.example.com:2376",
|
||||||
expectedURL: "//foobar.docker.io:2376",
|
expectedURL: "//foobar.example.com:2376",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "//foobar.docker.io:2376",
|
url: "//foobar.example.com:2376",
|
||||||
expectedURL: "//foobar.docker.io:2376",
|
expectedURL: "//foobar.example.com:2376",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "http://foobar.docker.io:2376",
|
url: "http://foobar.example.com:2376",
|
||||||
expectedURL: "http://foobar.docker.io:2376",
|
expectedURL: "http://foobar.example.com:2376",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "https://foobar.docker.io:2376",
|
url: "https://foobar.example.com:2376",
|
||||||
expectedURL: "https://foobar.docker.io:2376",
|
expectedURL: "https://foobar.example.com:2376",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "https://foobar.docker.io:2376/some/path",
|
url: "https://foobar.example.com:2376/some/path",
|
||||||
expectedURL: "https://foobar.docker.io:2376/some/path",
|
expectedURL: "https://foobar.example.com:2376/some/path",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "https://foobar.docker.io:2376/some/other/path?foo=bar",
|
url: "https://foobar.example.com:2376/some/other/path?foo=bar",
|
||||||
expectedURL: "https://foobar.docker.io:2376/some/other/path",
|
expectedURL: "https://foobar.example.com:2376/some/other/path",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "/foobar.docker.io",
|
url: "/foobar.example.com",
|
||||||
err: errors.New("no hostname in URL"),
|
err: errors.New("no hostname in URL"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "ftp://foobar.docker.io:2376",
|
url: "ftp://foobar.example.com:2376",
|
||||||
err: errors.New("unsupported scheme: ftp"),
|
err: errors.New("unsupported scheme: ftp"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user