Merge pull request #9308 from mheon/fix_6003

Rewrite copy-up to use buildah Copier
This commit is contained in:
OpenShift Merge Robot
2021-02-11 05:23:34 -05:00
committed by GitHub
4 changed files with 79 additions and 44 deletions

View File

@ -304,6 +304,24 @@ var _ = Describe("Podman run with volumes", func() {
Expect(separateVolumeSession.OutputToString()).To(Equal(baselineOutput))
})
It("podman named volume copyup symlink", func() {
imgName := "testimg"
dockerfile := `FROM alpine
RUN touch /testfile
RUN sh -c "cd /etc/apk && ln -s ../../testfile"`
podmanTest.BuildImage(dockerfile, imgName, "false")
baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", imgName, "ls", "/etc/apk/"})
baselineSession.WaitWithDefaultTimeout()
Expect(baselineSession.ExitCode()).To(Equal(0))
baselineOutput := baselineSession.OutputToString()
outputSession := podmanTest.Podman([]string{"run", "-t", "-i", "-v", "/etc/apk/", imgName, "ls", "/etc/apk/"})
outputSession.WaitWithDefaultTimeout()
Expect(outputSession.ExitCode()).To(Equal(0))
Expect(outputSession.OutputToString()).To(Equal(baselineOutput))
})
It("podman read-only tmpfs conflict with volume", func() {
session := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "--read-only", "-v", "tmp_volume:" + dest, ALPINE, "touch", dest + "/a"})
session.WaitWithDefaultTimeout()