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 <[email protected]>
  • Loading branch information
thaJeztah committed Jun 26, 2023
1 parent 91af1de commit 13475b4
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) {
const serverURL = "https://index.docker.io/v1/"
const 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) {
const serverURL = "https://index.docker.io/v1/"
const 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) {
const serverURL = "https://index.docker.io/v1/"
const 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) {
const serverURL = "https://index.docker.io/v1/"
const 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) {
const serverURL = "https://index.docker.io/v1/"
const serverURL = "https://registry.example.com/v1/"
creds := &Credentials{
ServerURL: serverURL,
Username: "foo",
Expand Down

0 comments on commit 13475b4

Please sign in to comment.