Merge pull request #11538 from duglin/EmptyVolume

Check volume path to make sure its not the empty string
This commit is contained in:
Arnaud Porterie
2015-03-22 19:25:50 -07:00
2 changed files with 20 additions and 0 deletions
+16
View File
@@ -5540,3 +5540,19 @@ func TestBuildResourceConstraintsAreUsed(t *testing.T) {
logDone("build - resource constraints applied")
}
func TestBuildEmptyStringVolume(t *testing.T) {
name := "testbuildemptystringvolume"
defer deleteImages(name)
_, err := buildImage(name, `
FROM busybox
ENV foo=""
VOLUME $foo
`, false)
if err == nil {
t.Fatal("Should have failed to build")
}
logDone("build - empty string volume")
}