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

Function TestSetEnvWithDotEnv_WithLocalPath

cmd/compose/compose_oci_test.go:60–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

58}
59
60func TestSetEnvWithDotEnv_WithLocalPath(t *testing.T) {
61 // Test that setEnvWithDotEnv still works with local paths
62 // This will fail if the file doesn't exist, but it should not panic
63 // or produce invalid paths
64 ctrl := gomock.NewController(t)
65 defer ctrl.Finish()
66 cli := mocks.NewMockCli(ctrl)
67
68 opts := ProjectOptions{
69 ConfigPaths: []string{"compose.yaml"},
70 ProjectDir: "",
71 EnvFiles: []string{},
72 }
73
74 // This may error if files don't exist, but should not panic
75 _ = setEnvWithDotEnv(opts, cli)
76}

Callers

nothing calls this directly

Calls 2

NewMockCliFunction · 0.92
setEnvWithDotEnvFunction · 0.85

Tested by

no test coverage detected