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

Function TestJSONMarshallConfig

cli/compose/loader/types_test.go:36–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

34}
35
36func TestJSONMarshallConfig(t *testing.T) {
37 workingDir := "/foo"
38 homeDir := "/bar"
39 cfg := fullExampleConfig(workingDir, homeDir)
40 actual, err := json.MarshalIndent(cfg, "", " ")
41 assert.NilError(t, err)
42 golden.Assert(t, string(actual), "full-example.json.golden")
43
44 jsonData, err := os.ReadFile("testdata/full-example.json.golden")
45 assert.NilError(t, err)
46 dict, err := ParseYAML(jsonData)
47 assert.NilError(t, err)
48 _, err = Load(buildConfigDetails(dict, map[string]string{}))
49 assert.NilError(t, err)
50}

Callers

nothing calls this directly

Calls 4

fullExampleConfigFunction · 0.85
ParseYAMLFunction · 0.85
buildConfigDetailsFunction · 0.85
LoadFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…