fix: support empty auth config for anonymous registry
- empty username means caller wants to use no credentials, typically for anonymous registry - Fixes https://github.com/containerd/cri/issues/1249 Signed-off-by: Nishchay Kumar <mrawesomenix@gmail.com>
This commit is contained in:
@@ -42,9 +42,9 @@ func TestParseAuth(t *testing.T) {
|
||||
expectErr bool
|
||||
}{
|
||||
"should not return error if auth config is nil": {},
|
||||
"should return error if no supported auth is provided": {
|
||||
"should not return error if empty auth is provided for access to anonymous registry": {
|
||||
auth: &runtime.AuthConfig{},
|
||||
expectErr: true,
|
||||
expectErr: false,
|
||||
},
|
||||
"should support identity token": {
|
||||
auth: &runtime.AuthConfig{IdentityToken: "abcd"},
|
||||
|
Reference in New Issue
Block a user