test/e2e/run_volume_test.go: mv dockerfile decl

Move declaration of a dockerfile closer to its use.
Since it is used only once, there's no sense in having it declared
globally.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2020-03-30 19:09:50 -07:00
parent ce38be7959
commit 504f9082ee

View File

@ -15,10 +15,6 @@ import (
"github.com/onsi/gomega/gexec"
)
var VolumeTrailingSlashDockerfile = `
FROM alpine:latest
VOLUME /test/`
var _ = Describe("Podman run with volumes", func() {
var (
tempdir string
@ -426,7 +422,10 @@ var _ = Describe("Podman run with volumes", func() {
It("Podman mount over image volume with trailing /", func() {
image := "podman-volume-test:trailing"
podmanTest.BuildImage(VolumeTrailingSlashDockerfile, image, "false")
dockerfile := `
FROM alpine:latest
VOLUME /test/`
podmanTest.BuildImage(dockerfile, image, "false")
ctrName := "testCtr"
create := podmanTest.Podman([]string{"create", "-v", "/tmp:/test", "--name", ctrName, image, "ls"})