mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Merge pull request #11538 from duglin/EmptyVolume
Check volume path to make sure its not the empty string
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user