summaryrefslogtreecommitdiff
path: root/test/system/045-start.bats
diff options
context:
space:
mode:
authorBoaz Shuster <boaz.shuster.github@gmail.com>2021-04-20 16:17:16 +0300
committerBoaz Shuster <boaz.shuster.github@gmail.com>2021-05-06 14:35:15 +0300
commitefdc7d84652bbdbf398c88d0287b0740f040a588 (patch)
tree25bc0f45eabf10fa80ff08ba49b73e2e04c6c395 /test/system/045-start.bats
parent0b05ba808d5e2fc75ce10b23405bd5c05da2c331 (diff)
downloadpodman-efdc7d84652bbdbf398c88d0287b0740f040a588.tar.gz
podman-efdc7d84652bbdbf398c88d0287b0740f040a588.tar.bz2
podman-efdc7d84652bbdbf398c88d0287b0740f040a588.zip
Add restart-policy to container filters & --filter to podman start
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
Diffstat (limited to 'test/system/045-start.bats')
-rw-r--r--test/system/045-start.bats17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/system/045-start.bats b/test/system/045-start.bats
index ff818e51d..542f9d1c2 100644
--- a/test/system/045-start.bats
+++ b/test/system/045-start.bats
@@ -40,4 +40,21 @@ load helpers
fi
}
+@test "podman start --filter - start only containers that match the filter" {
+ run_podman run -d $IMAGE /bin/true
+ cid="$output"
+ run_podman start --filter restart-policy=always $cid "CID of restart-policy=always container"
+ is "$output" ""
+
+ run_podman start --filter restart-policy=none $cid "CID of restart-policy=none container"
+ is "$output" "$cid"
+}
+
+@test "podman start --filter invalid-restart-policy - return error" {
+ run_podman run -d $IMAGE /bin/true
+ cid="$output"
+ run_podman 125 start --filter restart-policy=fakepolicy $cid "CID of restart-policy=<not-exists> container"
+ is "$output" "Error: fakepolicy invalid restart policy"
+}
+
# vim: filetype=sh