summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/10-images.at4
-rw-r--r--test/apiv2/20-containers.at4
-rwxr-xr-xtest/apiv2/test-apiv21
-rw-r--r--test/e2e/pod_create_test.go34
4 files changed, 43 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index abc8d44b7..d3fde9f9d 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -94,6 +94,10 @@ t GET libpod/images/json?filters='garb1age}' 500 \
t GET libpod/images/json?filters='{"label":["testl' 500 \
.cause="unexpected end of JSON input"
+# Prune images - bad all input
+t POST libpod/images/prune?all='garb1age' 500 \
+ .cause="schema: error converting value for \"all\""
+
# Prune images - bad filter input
t POST images/prune?filters='garb1age}' 500 \
.cause="invalid character 'g' looking for beginning of value"
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 8fdecb4bd..afff68c22 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -22,6 +22,10 @@ podman run $IMAGE true
t GET libpod/containers/json 200 length=0
+# bad all input
+t GET libpod/containers/json?all='garb1age' 500 \
+ .cause="schema: error converting value for \"all\""
+
t GET libpod/containers/json?all=true 200 \
length=1 \
.[0].Id~[0-9a-f]\\{64\\} \
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2
index e1bf28bae..c644b9578 100755
--- a/test/apiv2/test-apiv2
+++ b/test/apiv2/test-apiv2
@@ -327,6 +327,7 @@ function start_service() {
die "Cannot start service on non-localhost ($HOST)"
fi
+ echo $WORKDIR
$PODMAN_BIN --root $WORKDIR/server_root --syslog=true \
system service \
--time 15 \
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index 7297bfc6e..7d40d36dd 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -850,4 +850,38 @@ ENTRYPOINT ["sleep","99999"]
Expect(ok).To(BeTrue())
})
+ It("podman pod create --volume", func() {
+ volName := "testVol"
+ volCreate := podmanTest.Podman([]string{"volume", "create", volName})
+ volCreate.WaitWithDefaultTimeout()
+ Expect(volCreate).Should(Exit(0))
+ podName := "testPod"
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--volume", volName + ":/tmp1", "--name", podName})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate).Should(Exit(0))
+ podInspect := podmanTest.Podman([]string{"pod", "inspect", podName})
+ podInspect.WaitWithDefaultTimeout()
+ Expect(podInspect).Should(Exit(0))
+ data := podInspect.InspectPodToJSON()
+ Expect(data.Mounts[0].Name).To(Equal(volName))
+ ctrName := "testCtr"
+ ctrCreate := podmanTest.Podman([]string{"create", "--pod", podName, "--name", ctrName, ALPINE})
+ ctrCreate.WaitWithDefaultTimeout()
+ Expect(ctrCreate).Should(Exit(0))
+ ctrInspect := podmanTest.Podman([]string{"inspect", ctrName})
+ ctrInspect.WaitWithDefaultTimeout()
+ Expect(ctrInspect).Should(Exit(0))
+ ctrData := ctrInspect.InspectContainerToJSON()
+ Expect(ctrData[0].Mounts[0].Name).To(Equal(volName))
+
+ ctr2 := podmanTest.Podman([]string{"run", "--pod", podName, ALPINE, "sh", "-c", "echo hello >> " + "/tmp1/test"})
+ ctr2.WaitWithDefaultTimeout()
+ Expect(ctr2).Should(Exit(0))
+
+ ctr3 := podmanTest.Podman([]string{"run", "--pod", podName, ALPINE, "cat", "/tmp1/test"})
+ ctr3.WaitWithDefaultTimeout()
+ Expect(ctr3.OutputToString()).To(ContainSubstring("hello"))
+
+ })
+
})