summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorShivkumar13 <shivkumar.ople97@gmail.com>2021-08-11 22:57:25 +0530
committerShivkumar13 <sople@redhat.com>2021-08-21 00:54:13 +0530
commit319c85e89ee2ee565da12680cca041335296a0c0 (patch)
treee4b709d6fb524d5c46b920887c198b48797643b1 /test/e2e
parent8b14cd84ced46263f378c6090ccb61616810eb9e (diff)
downloadpodman-319c85e89ee2ee565da12680cca041335296a0c0.tar.gz
podman-319c85e89ee2ee565da12680cca041335296a0c0.tar.bz2
podman-319c85e89ee2ee565da12680cca041335296a0c0.zip
Support for --tls-verify flag in podman run & podman create
Signed-off-by: Shivkumar13 <sople@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/create_test.go20
-rw-r--r--test/e2e/run_test.go18
2 files changed, 34 insertions, 4 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 975596dee..32d98c2a9 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -60,10 +60,24 @@ var _ = Describe("Podman create", func() {
})
It("podman container create container based on a remote image", func() {
- session := podmanTest.Podman([]string{"container", "create", BB_GLIBC, "ls"})
+ containerCreate := podmanTest.Podman([]string{"container", "create", BB_GLIBC, "ls"})
+ containerCreate.WaitWithDefaultTimeout()
+ Expect(containerCreate).Should(Exit(0))
+
+ lock := GetPortLock("5000")
+ defer lock.Unlock()
+ session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ if !WaitContainerReady(podmanTest, "registry", "listening on", 20, 1) {
+ Skip("Cannot start docker registry.")
+ }
+
+ create := podmanTest.Podman([]string{"container", "create", "--tls-verify=false", ALPINE})
+ create.WaitWithDefaultTimeout()
+ Expect(create).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(3))
})
It("podman create using short options", func() {
@@ -609,7 +623,7 @@ var _ = Describe("Podman create", func() {
Expect(session).Should(ExitWithError())
})
- It("create container in pod ppublish ports should fail", func() {
+ It("create container in pod publish ports should fail", func() {
name := "createwithpublishports"
pod := podmanTest.RunTopContainerInPod("", "new:"+name)
pod.WaitWithDefaultTimeout()
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index d68aa6ac4..f60cfcab8 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -166,9 +166,25 @@ var _ = Describe("Podman run", func() {
})
It("podman run a container based on remote image", func() {
- session := podmanTest.Podman([]string{"run", "-dt", BB_GLIBC, "ls"})
+ // Changing session to rsession
+ rsession := podmanTest.Podman([]string{"run", "-dt", ALPINE, "ls"})
+ rsession.WaitWithDefaultTimeout()
+ Expect(rsession).Should(Exit(0))
+
+ lock := GetPortLock("5000")
+ defer lock.Unlock()
+ session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
+
+ if !WaitContainerReady(podmanTest, "registry", "listening on", 20, 1) {
+ Skip("Cannot start docker registry.")
+ }
+
+ run := podmanTest.Podman([]string{"run", "--tls-verify=false", ALPINE})
+ run.WaitWithDefaultTimeout()
+ Expect(run).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(3))
})
It("podman run a container with a --rootfs", func() {