summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-06 14:50:26 -0400
committerGitHub <noreply@github.com>2021-05-06 14:50:26 -0400
commit034470e5be8cfeef8ce0e0d2f47587a660682219 (patch)
tree74af195993a2fd2136c980b8035629fe4863051d /test
parent44184167e495a64f1a565a2bc2cccb6b5bc56eaa (diff)
parentefdc7d84652bbdbf398c88d0287b0740f040a588 (diff)
downloadpodman-034470e5be8cfeef8ce0e0d2f47587a660682219.tar.gz
podman-034470e5be8cfeef8ce0e0d2f47587a660682219.tar.bz2
podman-034470e5be8cfeef8ce0e0d2f47587a660682219.zip
Merge pull request #9689 from boaz0/boaz-1
add restart-policy to container filters & --filter to podman start
Diffstat (limited to 'test')
-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