1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-14 16:31:45 +05:30

Add a Docker Credentials label support for windows

Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
This commit is contained in:
Nassim 'Nass' Eddequiouaq
2017-03-08 18:07:14 +01:00
parent f7f2744e6d
commit 23a1f310a5
2 changed files with 20 additions and 5 deletions
+4 -2
View File
@@ -8,11 +8,13 @@ import (
func TestWinCredHelper(t *testing.T) {
creds := &credentials.Credentials{
Label: credentials.CredsLabel,
ServerURL: "https://foobar.docker.io:2376/v1",
Username: "foobar",
Secret: "foobarbaz",
}
creds1 := &credentials.Credentials{
Label: credentials.CredsLabel,
ServerURL: "https://foobar.docker.io:2376/v2",
Username: "foobarbaz",
Secret: "foobar",
@@ -36,14 +38,14 @@ func TestWinCredHelper(t *testing.T) {
t.Fatalf("expected %s, got %s\n", "foobarbaz", secret)
}
auths, err := helper.List()
auths, err := helper.List(credentials.CredsLabel)
if err != nil || len(auths) == 0 {
t.Fatal(err)
}
helper.Add(creds1)
defer helper.Delete(creds1.ServerURL)
newauths, err := helper.List()
newauths, err := helper.List(credentials.CredsLabel)
if err != nil {
t.Fatal(err)
}