summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/create_test.go11
-rw-r--r--test/e2e/pull_test.go6
-rw-r--r--test/system/030-run.bats12
3 files changed, 25 insertions, 4 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 6ed5ad2d8..105cba37c 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -70,6 +70,17 @@ var _ = Describe("Podman create", func() {
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
})
+ It("podman create using existing name", func() {
+ session := podmanTest.Podman([]string{"create", "--name=foo", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ session = podmanTest.Podman([]string{"create", "--name=foo", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ })
+
It("podman create adds annotation", func() {
session := podmanTest.Podman([]string{"create", "--annotation", "HELLO=WORLD", ALPINE, "ls"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index de6d4ea09..4e4e80d56 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -38,6 +38,12 @@ var _ = Describe("Podman pull", func() {
})
+ It("podman pull from docker a not existing image", func() {
+ session := podmanTest.Podman([]string{"pull", "ibetthisdoesntexistthere:foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ })
+
It("podman pull from docker with tag", func() {
session := podmanTest.Podman([]string{"pull", "busybox:glibc"})
session.WaitWithDefaultTimeout()
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index eef05747f..bdbe724ef 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -34,11 +34,15 @@ echo $rand | 0 | $rand
}
@test "podman run - uidmapping has no /sys/kernel mounts" {
- run_podman $expected_rc run --uidmapping 0:100:10000 $IMAGE mount | grep /sys/kernel
- is "$output" "" "podman run $cmd - output"
+ skip_if_rootless "cannot umount as rootless"
- run_podman $expected_rc run --net host --uidmapping 0:100:10000 $IMAGE mount | grep /sys/kernel
- is "$output" "" "podman run $cmd - output"
+ run_podman run --rm --uidmap 0:100:10000 $IMAGE mount
+ run grep /sys/kernel <(echo "$output")
+ is "$output" "" "unwanted /sys/kernel in 'mount' output"
+
+ run_podman run --rm --net host --uidmap 0:100:10000 $IMAGE mount
+ run grep /sys/kernel <(echo "$output")
+ is "$output" "" "unwanted /sys/kernel in 'mount' output (with --net=host)"
}
# vim: filetype=sh