aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_volume_test.go20
-rw-r--r--test/e2e/search_test.go13
2 files changed, 31 insertions, 2 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 46c27dc2e..e31338dbc 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -15,6 +15,10 @@ import (
"github.com/onsi/gomega/gexec"
)
+var VolumeTrailingSlashDockerfile = `
+FROM alpine:latest
+VOLUME /test/`
+
var _ = Describe("Podman run with volumes", func() {
var (
tempdir string
@@ -421,4 +425,20 @@ var _ = Describe("Podman run with volumes", func() {
Expect(len(outputArr)).To(Equal(1))
Expect(strings.Contains(outputArr[0], fileName)).To(BeTrue())
})
+
+ It("Podman mount over image volume with trailing /", func() {
+ image := "podman-volume-test:trailing"
+ podmanTest.BuildImage(VolumeTrailingSlashDockerfile, image, "false")
+
+ ctrName := "testCtr"
+ create := podmanTest.Podman([]string{"create", "-v", "/tmp:/test", "--name", ctrName, image, "ls"})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(Equal(0))
+
+ data := podmanTest.InspectContainer(ctrName)
+ Expect(len(data)).To(Equal(1))
+ Expect(len(data[0].Mounts)).To(Equal(1))
+ Expect(data[0].Mounts[0].Source).To(Equal("/tmp"))
+ Expect(data[0].Mounts[0].Destination).To(Equal("/test"))
+ })
})
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index d88231510..a697831ab 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -9,6 +9,7 @@ import (
"os"
"strconv"
"text/template"
+ "time"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
@@ -165,8 +166,16 @@ registries = ['{{.Host}}:{{.Port}}']`
})
It("podman search v2 registry with empty query", func() {
- search := podmanTest.Podman([]string{"search", "registry.fedoraproject.org/"})
- search.WaitWithDefaultTimeout()
+ var search *PodmanSessionIntegration
+ for i := 0; i < 5; i++ {
+ search = podmanTest.Podman([]string{"search", "registry.fedoraproject.org/"})
+ search.WaitWithDefaultTimeout()
+ if search.ExitCode() == 0 {
+ break
+ }
+ fmt.Println("Search failed; sleeping & retrying...")
+ time.Sleep(2 * time.Second)
+ }
Expect(search.ExitCode()).To(Equal(0))
Expect(len(search.OutputToStringArray())).To(BeNumerically(">=", 1))
})