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:
@@ -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",
|
||||
@@ -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) {
|
||||
const serverURL = "https://index.docker.io/v1/"
|
||||
const 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) {
|
||||
const serverURL = "https://index.docker.io/v1/"
|
||||
const 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) {
|
||||
const serverURL = "https://index.docker.io/v1/"
|
||||
const 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) {
|
||||
const serverURL = "https://index.docker.io/v1/"
|
||||
const serverURL = "https://registry.example.com/v1/"
|
||||
creds := &Credentials{
|
||||
ServerURL: serverURL,
|
||||
Username: "foo",
|
||||
|
||||
Reference in New Issue
Block a user