mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
update tests
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
774234750d
commit
3e3f94c161
@ -261,9 +261,18 @@ func TestLocalComposeVolume(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("check container volume specs", func(t *testing.T) {
|
||||
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx2_1", "--format", "{{ json .HostConfig.Mounts }}")
|
||||
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx2_1", "--format", "{{ json .Mounts }}")
|
||||
output := res.Stdout()
|
||||
//nolint
|
||||
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"}]`})
|
||||
assert.Assert(t, strings.Contains(output, `"Destination":"/usr/src/app/node_modules","Driver":"local","Mode":"","RW":true,"Propagation":""`))
|
||||
})
|
||||
|
||||
t.Run("check container bind-mounts specs", func(t *testing.T) {
|
||||
res := c.RunDockerCmd("inspect", "compose-e2e-volume_nginx_1", "--format", "{{ json .HostConfig.Mounts }}")
|
||||
output := res.Stdout()
|
||||
//nolint
|
||||
assert.Assert(t, strings.Contains(output, `"Type":"bind"`))
|
||||
assert.Assert(t, strings.Contains(output, `"Target":"/usr/share/nginx/html"`))
|
||||
})
|
||||
|
||||
t.Run("cleanup volume project", func(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user