(t *testing.T)
| 971 | } |
| 972 | |
| 973 | func 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 | |
| 997 | func TestLoadTmpfsVolume(t *testing.T) { |
| 998 | config, err := loadYAML(` |
nothing calls this directly
no test coverage detected
searching dependent graphs…