Support rw as a volume option in compose file.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-04-06 10:32:35 -04:00
parent fbddea6cac
commit 95b81eb684
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -132,3 +132,17 @@ func TestParseVolumeWithReadOnly(t *testing.T) {
assert.DeepEqual(t, volume, expected)
}
}
func TestParseVolumeWithRW(t *testing.T) {
for _, path := range []string{"./foo", "/home/user"} {
volume, err := parseVolume(path + ":/target:rw")
expected := types.ServiceVolumeConfig{
Type: "bind",
Source: path,
Target: "/target",
ReadOnly: false,
}
assert.NilError(t, err)
assert.DeepEqual(t, volume, expected)
}
}