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

Function TestLoadLegacyExperimental

cli/config/config_test.go:403–425  ·  view source on GitHub ↗

The CLI no longer disables/hides experimental CLI features, however, we need to verify that existing configuration files do not break

(t *testing.T)

Source from the content-addressed store, hash-verified

401// The CLI no longer disables/hides experimental CLI features, however, we need
402// to verify that existing configuration files do not break
403func TestLoadLegacyExperimental(t *testing.T) {
404 tests := []struct {
405 doc string
406 configfile string
407 }{
408 {
409 doc: "default",
410 configfile: `{}`,
411 },
412 {
413 doc: "experimental",
414 configfile: `{
415 "experimental": "enabled"
416}`,
417 },
418 }
419 for _, tc := range tests {
420 t.Run(tc.doc, func(t *testing.T) {
421 _, err := LoadFromReader(strings.NewReader(tc.configfile))
422 assert.NilError(t, err)
423 })
424 }
425}
426
427func TestConfigPath(t *testing.T) {
428 oldDir := Dir()

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…