1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-05-27 12:57:18 +02:00
parent 91af1de9af
commit 13475b4387
+6 -6
View File
@@ -42,7 +42,7 @@ func (m *memoryStore) List() (map[string]string, error) {
} }
func TestStore(t *testing.T) { func TestStore(t *testing.T) {
const serverURL = "https://index.docker.io/v1/" const serverURL = "https://registry.example.com/v1/"
creds := &Credentials{ creds := &Credentials{
ServerURL: serverURL, ServerURL: serverURL,
Username: "foo", Username: "foo",
@@ -95,7 +95,7 @@ func TestStoreMissingServerURL(t *testing.T) {
func TestStoreMissingUsername(t *testing.T) { func TestStoreMissingUsername(t *testing.T) {
creds := &Credentials{ creds := &Credentials{
ServerURL: "https://index.docker.io/v1/", ServerURL: "https://registry.example.com/v1/",
Username: "", Username: "",
Secret: "bar", Secret: "bar",
} }
@@ -114,7 +114,7 @@ func TestStoreMissingUsername(t *testing.T) {
} }
func TestGet(t *testing.T) { func TestGet(t *testing.T) {
const serverURL = "https://index.docker.io/v1/" const serverURL = "https://registry.example.com/v1/"
creds := &Credentials{ creds := &Credentials{
ServerURL: serverURL, ServerURL: serverURL,
Username: "foo", Username: "foo",
@@ -156,7 +156,7 @@ func TestGet(t *testing.T) {
} }
func TestGetMissingServerURL(t *testing.T) { func TestGetMissingServerURL(t *testing.T) {
const serverURL = "https://index.docker.io/v1/" const serverURL = "https://registry.example.com/v1/"
creds := &Credentials{ creds := &Credentials{
ServerURL: serverURL, ServerURL: serverURL,
Username: "foo", Username: "foo",
@@ -182,7 +182,7 @@ func TestGetMissingServerURL(t *testing.T) {
} }
func TestErase(t *testing.T) { func TestErase(t *testing.T) {
const serverURL = "https://index.docker.io/v1/" const serverURL = "https://registry.example.com/v1/"
creds := &Credentials{ creds := &Credentials{
ServerURL: serverURL, ServerURL: serverURL,
Username: "foo", Username: "foo",
@@ -211,7 +211,7 @@ func TestErase(t *testing.T) {
} }
func TestEraseMissingServerURL(t *testing.T) { func TestEraseMissingServerURL(t *testing.T) {
const serverURL = "https://index.docker.io/v1/" const serverURL = "https://registry.example.com/v1/"
creds := &Credentials{ creds := &Credentials{
ServerURL: serverURL, ServerURL: serverURL,
Username: "foo", Username: "foo",