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

Cleanup original modifications to the exposed APIs

Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
This commit is contained in:
Nassim 'Nass' Eddequiouaq
2017-03-09 01:33:48 +01:00
parent c5fbd3a5ad
commit 2a8670e0da
10 changed files with 26 additions and 34 deletions
+2 -4
View File
@@ -7,13 +7,11 @@ import (
func TestOSXKeychainHelper(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 +34,14 @@ func TestOSXKeychainHelper(t *testing.T) {
t.Fatalf("expected %s, got %s\n", "foobarbaz", secret)
}
auths, err := helper.List(credentials.CredsLabel)
auths, err := helper.List()
if err != nil || len(auths) == 0 {
t.Fatal(err)
}
helper.Add(creds1)
defer helper.Delete(creds1.ServerURL)
newauths, err := helper.List(credentials.CredsLabel)
newauths, err := helper.List()
if len(newauths)-len(auths) != 1 {
if err == nil {
t.Fatalf("Error: len(newauths): %d, len(auths): %d", len(newauths), len(auths))