MCPcopy Index your code
hub / github.com/docker/cli / TestConfigMergeInterpolation

Function TestConfigMergeInterpolation

cli/command/stack/config_test.go:21–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestConfigMergeInterpolation(t *testing.T) {
22 tests := []struct {
23 name string
24 skipInterpolation bool
25 fileOne string
26 fileTwo string
27 expected string
28 }{
29 {
30 name: "With Interpolation",
31 skipInterpolation: false,
32 fileOne: `version: "3.7"
33services:
34 foo:
35 image: busybox:latest
36 command: cat file1.txt
37`,
38 fileTwo: `version: "3.7"
39services:
40 foo:
41 image: busybox:${VERSION}
42 command: cat file2.txt
43`,
44 expected: `version: "3.7"
45services:
46 foo:
47 command:
48 - cat
49 - file2.txt
50 image: busybox:1.0
51`,
52 },
53 {
54 name: "Without Interpolation",
55 skipInterpolation: true,
56 fileOne: `version: "3.7"
57services:
58 foo:
59 image: busybox:latest
60 command: cat file1.txt
61`,
62 fileTwo: `version: "3.7"
63services:
64 foo:
65 image: busybox:${VERSION}
66 command: cat file2.txt
67`,
68 expected: `version: "3.7"
69services:
70 foo:
71 command:
72 - cat
73 - file2.txt
74 image: busybox:${VERSION}
75`,
76 },
77 }
78

Callers

nothing calls this directly

Calls 1

outputConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…