MCPcopy Create free account
hub / github.com/compose-spec/compose-go / TestProjectComposefilesFromWorkingDir

Function TestProjectComposefilesFromWorkingDir

cli/options_test.go:231–244  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229}
230
231func TestProjectComposefilesFromWorkingDir(t *testing.T) {
232 opts, err := NewProjectOptions([]string{
233 "testdata/simple/compose.yaml",
234 "testdata/simple/compose-with-overrides.yaml",
235 }, WithName("my_project"))
236 assert.NilError(t, err)
237 p, err := ProjectFromOptions(context.TODO(), opts)
238 assert.NilError(t, err)
239 currentDir, _ := os.Getwd()
240 assert.DeepEqual(t, p.ComposeFiles, []string{
241 filepath.Join(currentDir, "testdata", "simple", "compose.yaml"),
242 filepath.Join(currentDir, "testdata", "simple", "compose-with-overrides.yaml"),
243 })
244}
245
246func TestProjectComposefilesFromStdin(t *testing.T) {
247 composeData := `

Callers

nothing calls this directly

Calls 3

NewProjectOptionsFunction · 0.85
WithNameFunction · 0.85
ProjectFromOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…