From 33870ea2c3a3aa4e2bd3da3d84b21820c75eaf23 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Tue, 3 Jul 2018 13:55:59 -0400 Subject: Fix timeout issue with built-in volume test Building our own image to test built-in volume and user instead of using the mariadb one. Solves timeout issue in travis tests. Signed-off-by: umohnani8 Closes: #1044 Approved by: mheon --- test/e2e/run_test.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index cb021d297..dc087f700 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -487,11 +487,6 @@ var _ = Describe("Podman run", func() { }) It("podman run with built-in volume image", func() { - travisRun, exists := os.LookupEnv("TRAVIS") - if exists && travisRun == "1" { - Skip("Built-in volume test causes timeouts on Travis - replace mariadb-101-centos7 image to resolve") - } - session := podmanTest.Podman([]string{"run", "--rm", "docker.io/library/redis:alpine", "ls"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -500,12 +495,18 @@ var _ = Describe("Podman run", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - session = podmanTest.Podman([]string{"run", "--rm", "-e", "MYSQL_USER=zmuser", "-e", "MYSQL_PASSWORD=zmpass", "-e", "MYSQL_DATABASE=zm", "-e", "MYSQL_ROOT_PASSWORD=mysqlpassword", "docker.io/centos/mariadb-101-centos7", "ls", "-al", "/var/lib/mysql/data"}) + dockerfile := `FROM busybox +RUN mkdir -p /myvol/data && chown -R mail.0 /myvol +VOLUME ["/myvol/data"] +USER mail` + + podmanTest.BuildImage(dockerfile, "test", "false") + session = podmanTest.Podman([]string{"run", "--rm", "test", "ls", "-al", "/myvol/data"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - Expect(session.OutputToString()).To(ContainSubstring("mysql root")) + Expect(session.OutputToString()).To(ContainSubstring("mail root")) - session = podmanTest.Podman([]string{"rmi", "docker.io/centos/mariadb-101-centos7"}) + session = podmanTest.Podman([]string{"rmi", "test"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) }) -- cgit v1.2.3-54-g00ecf