From 91af1de9af4b02000b8879627abfcd04a4c120e1 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 27 May 2023 12:56:53 +0200 Subject: [PATCH] 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 --- registryurl/parse_test.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/registryurl/parse_test.go b/registryurl/parse_test.go index b5c161d0..9710dc1e 100644 --- a/registryurl/parse_test.go +++ b/registryurl/parse_test.go @@ -14,39 +14,39 @@ func TestHelperParseURL(t *testing.T) { err error }{ { - url: "foobar.docker.io", - expectedURL: "//foobar.docker.io", + url: "foobar.example.com", + expectedURL: "//foobar.example.com", }, { - url: "foobar.docker.io:2376", - expectedURL: "//foobar.docker.io:2376", + url: "foobar.example.com:2376", + expectedURL: "//foobar.example.com:2376", }, { - url: "//foobar.docker.io:2376", - expectedURL: "//foobar.docker.io:2376", + url: "//foobar.example.com:2376", + expectedURL: "//foobar.example.com:2376", }, { - url: "http://foobar.docker.io:2376", - expectedURL: "http://foobar.docker.io:2376", + url: "http://foobar.example.com:2376", + expectedURL: "http://foobar.example.com:2376", }, { - url: "https://foobar.docker.io:2376", - expectedURL: "https://foobar.docker.io:2376", + url: "https://foobar.example.com:2376", + expectedURL: "https://foobar.example.com:2376", }, { - url: "https://foobar.docker.io:2376/some/path", - expectedURL: "https://foobar.docker.io:2376/some/path", + url: "https://foobar.example.com:2376/some/path", + expectedURL: "https://foobar.example.com:2376/some/path", }, { - url: "https://foobar.docker.io:2376/some/other/path?foo=bar", - expectedURL: "https://foobar.docker.io:2376/some/other/path", + url: "https://foobar.example.com:2376/some/other/path?foo=bar", + expectedURL: "https://foobar.example.com:2376/some/other/path", }, { - url: "/foobar.docker.io", + url: "/foobar.example.com", 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"), }, }