Skip to content

Commit

Permalink
credentials: use designated domains in tests (RFC2606)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thaJeztah committed May 27, 2023
1 parent a81fc84 commit d65e2ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions credentials/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
}
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit d65e2ae

Please sign in to comment.