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

Function TestProjectFromSetOfFiles

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

Source from the content-addressed store, hash-verified

203}
204
205func TestProjectFromSetOfFiles(t *testing.T) {
206 opts, err := NewProjectOptions([]string{
207 "testdata/simple/compose.yaml",
208 "testdata/simple/compose-with-overrides.yaml",
209 }, WithName("my_project"))
210 assert.NilError(t, err)
211 p, err := ProjectFromOptions(context.TODO(), opts)
212 assert.NilError(t, err)
213 service, err := p.GetService("simple")
214 assert.NilError(t, err)
215 assert.Equal(t, service.Image, "haproxy")
216}
217
218func TestProjectComposefilesFromSetOfFiles(t *testing.T) {
219 opts, err := NewProjectOptions([]string{},

Callers

nothing calls this directly

Calls 4

NewProjectOptionsFunction · 0.85
WithNameFunction · 0.85
ProjectFromOptionsFunction · 0.85
GetServiceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…