mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-07 22:42:09 +00:00
Merge pull request #7994 from erikh/parser_fix_volume_parsing
builder: Fix handling of VOLUME command where multiple volumes are specified in a space delimited list.
This commit is contained in:
@@ -728,13 +728,26 @@ func TestBuildWithVolumes(t *testing.T) {
|
||||
result map[string]map[string]struct{}
|
||||
name = "testbuildvolumes"
|
||||
emptyMap = make(map[string]struct{})
|
||||
expected = map[string]map[string]struct{}{"/test1": emptyMap, "/test2": emptyMap}
|
||||
expected = map[string]map[string]struct{}{
|
||||
"/test1": emptyMap,
|
||||
"/test2": emptyMap,
|
||||
"/test3": emptyMap,
|
||||
"/test4": emptyMap,
|
||||
"/test5": emptyMap,
|
||||
"/test6": emptyMap,
|
||||
"[/test7": emptyMap,
|
||||
"/test8]": emptyMap,
|
||||
}
|
||||
)
|
||||
defer deleteImages(name)
|
||||
_, err := buildImage(name,
|
||||
`FROM scratch
|
||||
VOLUME /test1
|
||||
VOLUME /test2`,
|
||||
VOLUME /test2
|
||||
VOLUME /test3 /test4
|
||||
VOLUME ["/test5", "/test6"]
|
||||
VOLUME [/test7 /test8]
|
||||
`,
|
||||
true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user