MCPcopy Index your code
hub / github.com/docker/cli / TestJSONReaderNoFile

Function TestJSONReaderNoFile

cli/config/config_test.go:309–318  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

307}
308
309func TestJSONReaderNoFile(t *testing.T) {
310 js := ` { "auths": { "https://index.docker.io/v1/": { "auth": "am9lam9lOmhlbGxv", "email": "user@example.com" } } }`
311
312 config, err := LoadFromReader(strings.NewReader(js))
313 assert.NilError(t, err)
314
315 ac := config.AuthConfigs["https://index.docker.io/v1/"]
316 assert.Equal(t, ac.Username, "joejoe")
317 assert.Equal(t, ac.Password, "hello")
318}
319
320func TestJSONWithPsFormatNoFile(t *testing.T) {
321 js := `{

Callers

nothing calls this directly

Calls 1

LoadFromReaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…