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

Function TestSetEnvWithDotEnv_WithOCIArtifact

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

Source from the content-addressed store, hash-verified

26)
27
28func TestSetEnvWithDotEnv_WithOCIArtifact(t *testing.T) {
29 // Test that setEnvWithDotEnv doesn't fail when using OCI artifacts
30 ctrl := gomock.NewController(t)
31 defer ctrl.Finish()
32 cli := mocks.NewMockCli(ctrl)
33
34 opts := ProjectOptions{
35 ConfigPaths: []string{"oci://docker.io/dockersamples/welcome-to-docker"},
36 ProjectDir: "",
37 EnvFiles: []string{},
38 }
39
40 err := setEnvWithDotEnv(opts, cli)
41 assert.NilError(t, err, "setEnvWithDotEnv should not fail with OCI artifact path")
42}
43
44func TestSetEnvWithDotEnv_WithGitRemote(t *testing.T) {
45 // Test that setEnvWithDotEnv doesn't fail when using Git remotes

Callers

nothing calls this directly

Calls 2

NewMockCliFunction · 0.92
setEnvWithDotEnvFunction · 0.85

Tested by

no test coverage detected