(t *testing.T)
| 19 | } |
| 20 | |
| 21 | func 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" |
| 33 | services: |
| 34 | foo: |
| 35 | image: busybox:latest |
| 36 | command: cat file1.txt |
| 37 | `, |
| 38 | fileTwo: `version: "3.7" |
| 39 | services: |
| 40 | foo: |
| 41 | image: busybox:${VERSION} |
| 42 | command: cat file2.txt |
| 43 | `, |
| 44 | expected: `version: "3.7" |
| 45 | services: |
| 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" |
| 57 | services: |
| 58 | foo: |
| 59 | image: busybox:latest |
| 60 | command: cat file1.txt |
| 61 | `, |
| 62 | fileTwo: `version: "3.7" |
| 63 | services: |
| 64 | foo: |
| 65 | image: busybox:${VERSION} |
| 66 | command: cat file2.txt |
| 67 | `, |
| 68 | expected: `version: "3.7" |
| 69 | services: |
| 70 | foo: |
| 71 | command: |
| 72 | - cat |
| 73 | - file2.txt |
| 74 | image: busybox:${VERSION} |
| 75 | `, |
| 76 | }, |
| 77 | } |
| 78 |
nothing calls this directly
no test coverage detected
searching dependent graphs…