Skip to content

Commit f24120c

Browse files
committed
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 <[email protected]>
1 parent 94e2e07 commit f24120c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

registryurl/parse_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,39 @@ func TestHelperParseURL(t *testing.T) {
1414
err error
1515
}{
1616
{
17-
url: "foobar.docker.io",
18-
expectedURL: "//foobar.docker.io",
17+
url: "foobar.example.com",
18+
expectedURL: "//foobar.example.com",
1919
},
2020
{
21-
url: "foobar.docker.io:2376",
22-
expectedURL: "//foobar.docker.io:2376",
21+
url: "foobar.example.com:2376",
22+
expectedURL: "//foobar.example.com:2376",
2323
},
2424
{
25-
url: "//foobar.docker.io:2376",
26-
expectedURL: "//foobar.docker.io:2376",
25+
url: "//foobar.example.com:2376",
26+
expectedURL: "//foobar.example.com:2376",
2727
},
2828
{
29-
url: "http://foobar.docker.io:2376",
30-
expectedURL: "http://foobar.docker.io:2376",
29+
url: "http://foobar.example.com:2376",
30+
expectedURL: "http://foobar.example.com:2376",
3131
},
3232
{
33-
url: "https://foobar.docker.io:2376",
34-
expectedURL: "https://foobar.docker.io:2376",
33+
url: "https://foobar.example.com:2376",
34+
expectedURL: "https://foobar.example.com:2376",
3535
},
3636
{
37-
url: "https://foobar.docker.io:2376/some/path",
38-
expectedURL: "https://foobar.docker.io:2376/some/path",
37+
url: "https://foobar.example.com:2376/some/path",
38+
expectedURL: "https://foobar.example.com:2376/some/path",
3939
},
4040
{
41-
url: "https://foobar.docker.io:2376/some/other/path?foo=bar",
42-
expectedURL: "https://foobar.docker.io:2376/some/other/path",
41+
url: "https://foobar.example.com:2376/some/other/path?foo=bar",
42+
expectedURL: "https://foobar.example.com:2376/some/other/path",
4343
},
4444
{
45-
url: "/foobar.docker.io",
45+
url: "/foobar.example.com",
4646
err: errors.New("no hostname in URL"),
4747
},
4848
{
49-
url: "ftp://foobar.docker.io:2376",
49+
url: "ftp://foobar.example.com:2376",
5050
err: errors.New("unsupported scheme: ftp"),
5151
},
5252
}

0 commit comments

Comments
 (0)