mirror of https://github.com/docker/compose.git
Fix index out of range on compose.buildContainerMountOptions
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
ea5b094a93
commit
7d768e7c1d
|
@ -126,12 +126,12 @@ func TestBuildContainerMountOptions(t *testing.T) {
|
|||
mounts, err := buildContainerMountOptions(project, project.Services[0], moby.ImageInspect{}, inherit)
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, len(mounts) == 2)
|
||||
assert.Assert(t, mounts[0].Target == "/var/myvolume1")
|
||||
assert.Assert(t, mounts[1].Target == "/var/myvolume2")
|
||||
assert.Equal(t, mounts[0].Target, "/var/myvolume1")
|
||||
assert.Equal(t, mounts[1].Target, "/var/myvolume2")
|
||||
|
||||
mounts, err = buildContainerMountOptions(project, project.Services[0], moby.ImageInspect{}, inherit)
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, len(mounts) == 2)
|
||||
assert.Assert(t, mounts[0].Target == "/var/myvolume1")
|
||||
assert.Assert(t, mounts[1].Target == "/var/myvolume2")
|
||||
assert.Equal(t, mounts[0].Target, "/var/myvolume1")
|
||||
assert.Equal(t, mounts[1].Target, "/var/myvolume2")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue