From d65e2ae05b46ee1cb267a5ad20de1befcea68323 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 27 May 2023 12:57:18 +0200 Subject: [PATCH] credentials: 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 --- credentials/credentials_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/credentials/credentials_test.go b/credentials/credentials_test.go index 9c0f1d7e..cb5fe6ef 100644 --- a/credentials/credentials_test.go +++ b/credentials/credentials_test.go @@ -42,7 +42,7 @@ func (m *memoryStore) List() (map[string]string, error) { } func TestStore(t *testing.T) { - serverURL := "https://index.docker.io/v1/" + serverURL := "https://registry.example.com/v1/" creds := &Credentials{ ServerURL: serverURL, Username: "foo", @@ -95,7 +95,7 @@ func TestStoreMissingServerURL(t *testing.T) { func TestStoreMissingUsername(t *testing.T) { creds := &Credentials{ - ServerURL: "https://index.docker.io/v1/", + ServerURL: "https://registry.example.com/v1/", Username: "", Secret: "bar", } @@ -114,7 +114,7 @@ func TestStoreMissingUsername(t *testing.T) { } func TestGet(t *testing.T) { - serverURL := "https://index.docker.io/v1/" + serverURL := "https://registry.example.com/v1/" creds := &Credentials{ ServerURL: serverURL, Username: "foo", @@ -156,7 +156,7 @@ func TestGet(t *testing.T) { } func TestGetMissingServerURL(t *testing.T) { - serverURL := "https://index.docker.io/v1/" + serverURL := "https://registry.example.com/v1/" creds := &Credentials{ ServerURL: serverURL, Username: "foo", @@ -182,7 +182,7 @@ func TestGetMissingServerURL(t *testing.T) { } func TestErase(t *testing.T) { - serverURL := "https://index.docker.io/v1/" + serverURL := "https://registry.example.com/v1/" creds := &Credentials{ ServerURL: serverURL, Username: "foo", @@ -211,7 +211,7 @@ func TestErase(t *testing.T) { } func TestEraseMissingServerURL(t *testing.T) { - serverURL := "https://index.docker.io/v1/" + serverURL := "https://registry.example.com/v1/" creds := &Credentials{ ServerURL: serverURL, Username: "foo",