Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 1347447

Browse files
authored
Merge pull request #1201 from ulyssessouza/bump-compose-fo
Bump compose-go for absolute paths fix
2 parents 51d78c0 + bf17797 commit 1347447

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/awslabs/goformation/v4 v4.15.6
1818
github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129
1919
github.com/cnabio/cnab-to-oci v0.3.1-beta1
20-
github.com/compose-spec/compose-go v0.0.0-20210119095023-cd294eea46e9
20+
github.com/compose-spec/compose-go v0.0.0-20210128135116-292e3df05d93
2121
github.com/containerd/console v1.0.1
2222
github.com/containerd/containerd v1.4.3
2323
github.com/containerd/continuity v0.0.0-20200928162600-f2cc35102c2a // indirect

go.sum

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,9 @@ github.com/cnabio/cnab-to-oci v0.3.1-beta1/go.mod h1:8BomA5Vye+3V/Kd2NSFblCBmp1r
306306
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
307307
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
308308
github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
309-
github.com/compose-spec/compose-go v0.0.0-20210119095023-cd294eea46e9 h1:fk9KYzKkVy6q1ETSXOPDHxeoj2ZBKZFP27XVfVMRMUM=
310-
github.com/compose-spec/compose-go v0.0.0-20210119095023-cd294eea46e9/go.mod h1:rz7rjxJGA/pWpLdBmDdqymGm2okEDYgBE7yx569xW+I=
311309
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
310+
github.com/compose-spec/compose-go v0.0.0-20210128135116-292e3df05d93 h1:An81C14E6chlgVNYFzl38nNhVD71aKhUXGosteUW2a4=
311+
github.com/compose-spec/compose-go v0.0.0-20210128135116-292e3df05d93/go.mod h1:s53PhZODE+L0pFAsTcueMKrZE7q1F1Qtm+d4s8xJjwE=
312312
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
313313
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
314314
github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340 h1:9atoWyI9RtXFwf7UDbme/6M8Ud0rFrx+Q3ZWgSnsxtw=
@@ -982,6 +982,8 @@ github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/
982982
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
983983
github.com/mattn/go-shellwords v1.0.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw=
984984
github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
985+
github.com/mattn/go-shellwords v1.0.11 h1:vCoR9VPpsk/TZFW2JwK5I9S0xdrtUq2bph6/YjEPnaw=
986+
github.com/mattn/go-shellwords v1.0.11/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
985987
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
986988
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
987989
github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -1929,6 +1931,7 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
19291931
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
19301932
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
19311933
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
1934+
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
19321935
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
19331936
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
19341937
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

local/e2e/compose/compose_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ func TestLocalComposeUp(t *testing.T) {
6666
})
6767

6868
t.Run("check compose labels", func(t *testing.T) {
69+
wd, _ := os.Getwd()
6970
res := c.RunDockerCmd("inspect", projectName+"_web_1")
7071
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.container-number": "1"`})
7172
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project": "compose-e2e-demo"`})
7273
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.oneoff": "False",`})
7374
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.config-hash":`})
74-
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.config_files": "./fixtures/sentences/compose.yaml"`})
75+
res.Assert(t, icmd.Expected{Out: fmt.Sprintf(`"com.docker.compose.project.config_files": "%s/fixtures/sentences/compose.yaml"`, wd)})
7576
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.working_dir":`})
7677
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.service": "web"`})
7778
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.version":`})
@@ -122,7 +123,7 @@ func TestLocalComposeRun(t *testing.T) {
122123
containerID := fields[len(fields)-1]
123124
assert.Assert(t, !strings.HasPrefix(containerID, "run-test_front"))
124125
if strings.HasPrefix(containerID, "run-test_back") {
125-
//only the one-off container for back service
126+
// only the one-off container for back service
126127
assert.Assert(t, strings.HasPrefix(containerID, "run-test_back_run_"), containerID)
127128
truncatedSlug = strings.Replace(containerID, "run-test_back_run_", "", 1)
128129
runContainerID = containerID
@@ -200,7 +201,7 @@ func TestLocalComposeBuild(t *testing.T) {
200201
c := NewParallelE2eCLI(t, binDir)
201202

202203
t.Run("build named and unnamed images", func(t *testing.T) {
203-
//ensure local test run does not reuse previously build image
204+
// ensure local test run does not reuse previously build image
204205
c.RunDockerOrExitError("rmi", "build-test_nginx")
205206
c.RunDockerOrExitError("rmi", "custom-nginx")
206207

@@ -248,7 +249,7 @@ func TestLocalComposeVolume(t *testing.T) {
248249
const projectName = "compose-e2e-volume"
249250

250251
t.Run("up with build and no image name, volume", func(t *testing.T) {
251-
//ensure local test run does not reuse previously build image
252+
// ensure local test run does not reuse previously build image
252253
c.RunDockerOrExitError("rmi", "compose-e2e-volume_nginx")
253254
c.RunDockerOrExitError("volume", "rm", projectName+"_staticVol")
254255
c.RunDockerOrExitError("volume", "rm", "myvolume")
@@ -263,14 +264,14 @@ func TestLocalComposeVolume(t *testing.T) {
263264
t.Run("check container volume specs", func(t *testing.T) {
264265
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx2_1", "--format", "{{ json .Mounts }}")
265266
output := res.Stdout()
266-
//nolint
267+
// nolint
267268
assert.Assert(t, strings.Contains(output, `"Destination":"/usr/src/app/node_modules","Driver":"local","Mode":"","RW":true,"Propagation":""`), output)
268269
})
269270

270271
t.Run("check container bind-mounts specs", func(t *testing.T) {
271272
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx_1", "--format", "{{ json .HostConfig.Mounts }}")
272273
output := res.Stdout()
273-
//nolint
274+
// nolint
274275
assert.Assert(t, strings.Contains(output, `"Type":"bind"`))
275276
assert.Assert(t, strings.Contains(output, `"Target":"/usr/share/nginx/html"`))
276277
})

0 commit comments

Comments
 (0)