Skip to content

Commit a81fc84

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 3596a55 commit a81fc84

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

registryurl/parse_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ func TestHelperParseURL(t *testing.T) {
1313
expectedURL string
1414
err error
1515
}{
16-
{url: "foobar.docker.io", expectedURL: "//foobar.docker.io"},
17-
{url: "foobar.docker.io:2376", expectedURL: "//foobar.docker.io:2376"},
18-
{url: "//foobar.docker.io:2376", expectedURL: "//foobar.docker.io:2376"},
19-
{url: "http://foobar.docker.io:2376", expectedURL: "http://foobar.docker.io:2376"},
20-
{url: "https://foobar.docker.io:2376", expectedURL: "https://foobar.docker.io:2376"},
21-
{url: "https://foobar.docker.io:2376/some/path", expectedURL: "https://foobar.docker.io:2376/some/path"},
22-
{url: "https://foobar.docker.io:2376/some/other/path?foo=bar", expectedURL: "https://foobar.docker.io:2376/some/other/path"},
23-
{url: "/foobar.docker.io", err: errors.New("no hostname in URL")},
24-
{url: "ftp://foobar.docker.io:2376", err: errors.New("unsupported scheme: ftp")},
16+
{url: "foobar.example.com", expectedURL: "//foobar.example.com"},
17+
{url: "foobar.example.com:2376", expectedURL: "//foobar.example.com:2376"},
18+
{url: "//foobar.example.com:2376", expectedURL: "//foobar.example.com:2376"},
19+
{url: "http://foobar.example.com:2376", expectedURL: "http://foobar.example.com:2376"},
20+
{url: "https://foobar.example.com:2376", expectedURL: "https://foobar.example.com:2376"},
21+
{url: "https://foobar.example.com:2376/some/path", expectedURL: "https://foobar.example.com:2376/some/path"},
22+
{url: "https://foobar.example.com:2376/some/other/path?foo=bar", expectedURL: "https://foobar.example.com:2376/some/other/path"},
23+
{url: "/foobar.example.com", err: errors.New("no hostname in URL")},
24+
{url: "ftp://foobar.example.com:2376", err: errors.New("unsupported scheme: ftp")},
2525
}
2626

2727
for _, te := range tests {

0 commit comments

Comments
 (0)