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

Commit 3e3f94c

Browse files
author
aiordache
committed
update tests
Signed-off-by: aiordache <[email protected]>
1 parent 7742347 commit 3e3f94c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/compose-e2e/compose_test.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,18 @@ func TestLocalComposeVolume(t *testing.T) {
261261
})
262262

263263
t.Run("check container volume specs", func(t *testing.T) {
264-
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx2_1", "--format", "{{ json .HostConfig.Mounts }}")
264+
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx2_1", "--format", "{{ json .Mounts }}")
265+
output := res.Stdout()
265266
//nolint
266-
res.Assert(t, icmd.Expected{Out: `[{"Type":"volume","Source":"compose-e2e-volume_staticVol","Target":"/usr/share/nginx/html","ReadOnly":true},{"Type":"volume","Target":"/usr/src/app/node_modules"},{"Type":"volume","Source":"myVolume","Target":"/usr/share/nginx/test"}]`})
267+
assert.Assert(t, strings.Contains(output, `"Destination":"/usr/src/app/node_modules","Driver":"local","Mode":"","RW":true,"Propagation":""`))
268+
})
269+
270+
t.Run("check container bind-mounts specs", func(t *testing.T) {
271+
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx_1", "--format", "{{ json .HostConfig.Mounts }}")
272+
output := res.Stdout()
273+
//nolint
274+
assert.Assert(t, strings.Contains(output, `"Type":"bind"`))
275+
assert.Assert(t, strings.Contains(output, `"Target":"/usr/share/nginx/html"`))
267276
})
268277

269278
t.Run("cleanup volume project", func(t *testing.T) {

0 commit comments

Comments
 (0)