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

Function TestJSONWithPsFormatNoFile

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

Source from the content-addressed store, hash-verified

318}
319
320func TestJSONWithPsFormatNoFile(t *testing.T) {
321 js := `{
322 "auths": { "https://index.docker.io/v1/": { "auth": "am9lam9lOmhlbGxv", "email": "user@example.com" } },
323 "psFormat": "table {{.ID}}\\t{{.Label \"com.docker.label.cpu\"}}"
324}`
325 config, err := LoadFromReader(strings.NewReader(js))
326 assert.NilError(t, err)
327
328 if config.PsFormat != `table {{.ID}}\t{{.Label "com.docker.label.cpu"}}` {
329 t.Fatalf("Unknown ps format: %s\n", config.PsFormat)
330 }
331}
332
333func TestJSONSaveWithNoFile(t *testing.T) {
334 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…