Skip to content

Commit d65e2ae

Browse files
committed
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 <[email protected]>
1 parent a81fc84 commit d65e2ae

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

credentials/credentials_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (m *memoryStore) List() (map[string]string, error) {
4242
}
4343

4444
func TestStore(t *testing.T) {
45-
serverURL := "https://index.docker.io/v1/"
45+
serverURL := "https://registry.example.com/v1/"
4646
creds := &Credentials{
4747
ServerURL: serverURL,
4848
Username: "foo",
@@ -95,7 +95,7 @@ func TestStoreMissingServerURL(t *testing.T) {
9595

9696
func TestStoreMissingUsername(t *testing.T) {
9797
creds := &Credentials{
98-
ServerURL: "https://index.docker.io/v1/",
98+
ServerURL: "https://registry.example.com/v1/",
9999
Username: "",
100100
Secret: "bar",
101101
}
@@ -114,7 +114,7 @@ func TestStoreMissingUsername(t *testing.T) {
114114
}
115115

116116
func TestGet(t *testing.T) {
117-
serverURL := "https://index.docker.io/v1/"
117+
serverURL := "https://registry.example.com/v1/"
118118
creds := &Credentials{
119119
ServerURL: serverURL,
120120
Username: "foo",
@@ -156,7 +156,7 @@ func TestGet(t *testing.T) {
156156
}
157157

158158
func TestGetMissingServerURL(t *testing.T) {
159-
serverURL := "https://index.docker.io/v1/"
159+
serverURL := "https://registry.example.com/v1/"
160160
creds := &Credentials{
161161
ServerURL: serverURL,
162162
Username: "foo",
@@ -182,7 +182,7 @@ func TestGetMissingServerURL(t *testing.T) {
182182
}
183183

184184
func TestErase(t *testing.T) {
185-
serverURL := "https://index.docker.io/v1/"
185+
serverURL := "https://registry.example.com/v1/"
186186
creds := &Credentials{
187187
ServerURL: serverURL,
188188
Username: "foo",
@@ -211,7 +211,7 @@ func TestErase(t *testing.T) {
211211
}
212212

213213
func TestEraseMissingServerURL(t *testing.T) {
214-
serverURL := "https://index.docker.io/v1/"
214+
serverURL := "https://registry.example.com/v1/"
215215
creds := &Credentials{
216216
ServerURL: serverURL,
217217
Username: "foo",

0 commit comments

Comments
 (0)