From efdc7d84652bbdbf398c88d0287b0740f040a588 Mon Sep 17 00:00:00 2001 From: Boaz Shuster Date: Tue, 20 Apr 2021 16:17:16 +0300 Subject: Add restart-policy to container filters & --filter to podman start Signed-off-by: Boaz Shuster --- test/system/045-start.bats | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/system') 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= container" + is "$output" "Error: fakepolicy invalid restart policy" +} + # vim: filetype=sh -- cgit v1.2.3-54-g00ecf