-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update cuelabs.dev/oci/ociregistry to pull in fix for #2934
Some tools in the Docker space add a default credential helper to the configuration file, even when said helper may not be installed. The docker CLI ignores errors from the default credential helper, and for consistency and to avoid unnecessary errors, ociauth no longer considers a default credential helper which is not installed as fatal. We add an integration test in cmd/cue even though ociauth has unit tests so that we can be extra sure that cmd/cue does not regress. Fixes #2934. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Ib3f3278ba966139fd7e8bbe45bcd3f4ab0aea754 Dispatch-Trailer: {"type":"trybot","CL":1183396,"patchset":1,"ref":"refs/changes/96/1183396/1","targetBranch":"master"}
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,19 @@ exec cue export . | |
cmp stdout expect-stdout | ||
|
||
# Sanity-check that we get an error when using the wrong password. | ||
env CUE_CACHE_DIR=$WORK/.tmp/different-cache | ||
rm $CUE_CACHE_DIR | ||
env-fill dockerconfig/badpassword.json | ||
cp dockerconfig/badpassword.json dockerconfig/config.json | ||
! exec cue export . | ||
stderr 'import failed: cannot find package "example.com/e": cannot fetch example.com/[email protected]: module example.com/[email protected]: error response: 401 Unauthorized; body: "invalid credentials' | ||
|
||
# Sanity-check that a configured default helper which is not installed | ||
# is not treated as a fatal error. See https://cuelang.org/issue/2934. | ||
rm $CUE_CACHE_DIR | ||
env-fill dockerconfig/missing_default_helper.json | ||
cp dockerconfig/missing_default_helper.json dockerconfig/config.json | ||
exec cue export . | ||
cmp stdout expect-stdout | ||
-- dockerconfig/config.json -- | ||
{ | ||
"auths": { | ||
|
@@ -29,6 +37,16 @@ stderr 'import failed: cannot find package "example.com/e": cannot fetch example | |
} | ||
} | ||
} | ||
-- dockerconfig/missing_default_helper.json -- | ||
{ | ||
"credsStore": "definitely-not-found-executable", | ||
"auths": { | ||
"${DEBUG_REGISTRY_HOST}": { | ||
"username": "someone", | ||
"password": "something" | ||
} | ||
} | ||
} | ||
-- expect-stdout -- | ||
"ok" | ||
-- main.cue -- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters