summaryrefslogtreecommitdiff
path: root/test/system/030-run.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/030-run.bats')
-rw-r--r--test/system/030-run.bats20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 28dc7c7a7..f7c48da8d 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -460,4 +460,24 @@ json-file | f
is "$output" "$expect" "podman run with --tz=local, matches host"
}
+@test "podman container exists" {
+ rand=$(random_string 30)
+ run_podman 1 container exists myctr
+
+ run_podman create --name myctr $IMAGE /bin/true
+ run_podman container exists myctr
+
+ # Create a container that podman does not know about
+ run buildah from $IMAGE
+ cid="$output"
+
+ # exists should fail
+ run_podman 1 container exists $cid
+
+ # exists should succeed
+ run_podman container exists --external $cid
+
+ run buildah rm $cid
+}
+
# vim: filetype=sh