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:
@@ -85,7 +85,7 @@ func (h Osxkeychain) Get(serverURL string) (string, string, error) {
|
||||
goMsg := C.GoString(errMsg)
|
||||
|
||||
if goMsg == errCredentialsNotFound {
|
||||
return "", "", credentials.ErrCredentialsNotFound
|
||||
return "", "", credentials.NewErrCredentialsNotFound()
|
||||
}
|
||||
|
||||
return "", "", errors.New(goMsg)
|
||||
|
||||
@@ -39,7 +39,7 @@ func TestOSXKeychainHelper(t *testing.T) {
|
||||
func TestMissingCredentials(t *testing.T) {
|
||||
helper := Osxkeychain{}
|
||||
_, _, 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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user