MCPcopy
hub / github.com/docker/compose / TestDependsOnMultipleProviders

Function TestDependsOnMultipleProviders

pkg/e2e/providers_test.go:63–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestDependsOnMultipleProviders(t *testing.T) {
64 provider, err := findExecutable("example-provider")
65 assert.NilError(t, err)
66
67 path := fmt.Sprintf("%s%s%s", os.Getenv("PATH"), string(os.PathListSeparator), filepath.Dir(provider))
68 c := NewParallelCLI(t, WithEnv("PATH="+path))
69 const projectName = "depends-on-multiple-providers"
70 t.Cleanup(func() {
71 c.cleanupWithDown(t, projectName)
72 })
73
74 res := c.RunDockerComposeCmd(t, "-f", "fixtures/providers/depends-on-multiple-providers.yaml", "--project-name", projectName, "up")
75 res.Assert(t, icmd.Success)
76 env := getEnv(res.Combined())
77 assert.Check(t, slices.Contains(env, "PROVIDER1_URL=https://magic.cloud/provider1"), env)
78 assert.Check(t, slices.Contains(env, "PROVIDER2_URL=https://magic.cloud/provider2"), env)
79}
80
81func TestProviderRawSetEnv(t *testing.T) {
82 provider, err := findExecutable("example-provider")

Callers

nothing calls this directly

Calls 7

findExecutableFunction · 0.85
NewParallelCLIFunction · 0.85
WithEnvFunction · 0.85
getEnvFunction · 0.85
cleanupWithDownMethod · 0.80
RunDockerComposeCmdMethod · 0.80
DirMethod · 0.45

Tested by

no test coverage detected