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

Function TestFullExample

cli/compose/loader/loader_test.go:973–995  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

971}
972
973func TestFullExample(t *testing.T) {
974 skip.If(t, runtime.GOOS == "windows", "FIXME: substitutes platform-specific HOME-dirs and requires platform-specific golden files; see https://github.com/docker/cli/pull/4610")
975
976 data, err := os.ReadFile("full-example.yml")
977 assert.NilError(t, err)
978
979 homeDir := "/home/foo"
980 env := map[string]string{"HOME": homeDir, "QUX": "qux_from_environment"}
981 config, err := loadYAMLWithEnv(string(data), env)
982 assert.NilError(t, err)
983
984 workingDir, err := os.Getwd()
985 assert.NilError(t, err)
986
987 expected := fullExampleConfig(workingDir, homeDir)
988
989 assert.Check(t, is.DeepEqual(expected.Services, config.Services))
990 assert.Check(t, is.DeepEqual(expected.Networks, config.Networks))
991 assert.Check(t, is.DeepEqual(expected.Volumes, config.Volumes))
992 assert.Check(t, is.DeepEqual(expected.Secrets, config.Secrets))
993 assert.Check(t, is.DeepEqual(expected.Configs, config.Configs))
994 assert.Check(t, is.DeepEqual(expected.Extras, config.Extras))
995}
996
997func TestLoadTmpfsVolume(t *testing.T) {
998 config, err := loadYAML(`

Callers

nothing calls this directly

Calls 2

loadYAMLWithEnvFunction · 0.85
fullExampleConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…