mirror of
https://github.com/containers/podman.git
synced 2026-09-16 07:40:02 -04:00
ParseRestartPolicy parses the value of the --restart flag and had no unit test. It handles several distinct cases: bare policy names, the "never" -> "no" normalization (case-insensitive), on-failure with a retry count, and a number of error paths (retries specified on a non-on-failure policy, non-numeric or negative retry counts, and too many colon-separated fields). Add a table-driven unit test covering the happy paths and each error branch. Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>