MCPcopy Create free account
hub / github.com/docker/cli / TestGetAllCredentialsFileStoreOnly

Function TestGetAllCredentialsFileStoreOnly

cli/config/configfile/file_test.go:200–214  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

198}
199
200func TestGetAllCredentialsFileStoreOnly(t *testing.T) {
201 configFile := New("filename")
202 exampleAuth := types.AuthConfig{
203 Username: "user",
204 Password: "pass",
205 }
206 configFile.AuthConfigs["example.com/foo"] = exampleAuth
207
208 authConfigs, err := configFile.GetAllCredentials()
209 assert.NilError(t, err)
210
211 expected := make(map[string]types.AuthConfig)
212 expected["example.com/foo"] = exampleAuth
213 assert.Check(t, is.DeepEqual(expected, authConfigs))
214}
215
216func TestGetAllCredentialsCredsStore(t *testing.T) {
217 configFile := New("filename")

Callers

nothing calls this directly

Calls 2

GetAllCredentialsMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…