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

Add client functions to allow integrations within other CLIs.

This is a simplification of how the docker engine implements
this feature, but it will be ported there once this is merged.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera
2016-05-24 21:07:53 -07:00
parent 00703eb6db
commit c4fc9c07dd
13 changed files with 369 additions and 24 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ func (h Secretservice) Get(serverURL string) (string, string, error) {
user := C.GoString(username)
pass := C.GoString(secret)
if pass == "" {
return "", "", credentials.ErrCredentialsNotFound
return "", "", credentials.NewErrCredentialsNotFound()
}
return user, pass, nil
}
+2 -2
View File
@@ -43,7 +43,7 @@ func TestMissingCredentials(t *testing.T) {
helper := Secretservice{}
_, _, err := helper.Get("https://adsfasdf.wrewerwer.com/asdfsdddd")
if err != credentials.ErrCredentialsNotFound {
t.Fatalf("exptected ErrCredentialsNotFound, got %v", err)
if !credentials.IsErrCredentialsNotFound(err) {
t.Fatalf("expected ErrCredentialsNotFound, got %v", err)
}
}