From 141de86862898a4b9e35c15f51031952c63c7114 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 22 Dec 2021 09:35:00 -0500 Subject: Revamp Libpod state strings for Docker compat Improve our compatibility with Docker by better handling the state strings that we print in `podman ps`. Docker capitalizes all states in `ps` (we do not) - fix this in our PS code. Also, stop normalizing ContainerStateConfigured to the "Created" state, and instead make it always be Created, with the existing Created state becoming Initialized. I didn't rename the actual states because I'm somewhat reticent to make such a large change a day before we leave for break. It's somewhat confusing that ContainerStateConfigured now returns Created, but internally and externally we're still consistent. [NO NEW TESTS NEEDED] existing tests should catch anything that broke. I also consider this a breaking change. I will flag appropriately on Github. Fixes RHBZ#2010432 and RHBZ#2032561 Signed-off-by: Matthew Heon --- test/system/040-ps.bats | 2 +- test/system/080-pause.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/system') diff --git a/test/system/040-ps.bats b/test/system/040-ps.bats index 61b290415..8d0a405d2 100644 --- a/test/system/040-ps.bats +++ b/test/system/040-ps.bats @@ -110,7 +110,7 @@ EOF run_podman ps --external is "${#lines[@]}" "3" "podman ps -a --external sees buildah containers" is "${lines[1]}" \ - "[0-9a-f]\{12\} \+$IMAGE *buildah .* seconds ago .* storage .* ${PODMAN_TEST_IMAGE_NAME}-working-container" \ + "[0-9a-f]\{12\} \+$IMAGE *buildah .* seconds ago .* Storage .* ${PODMAN_TEST_IMAGE_NAME}-working-container" \ "podman ps --external" # 'rm -a' should be a NOP diff --git a/test/system/080-pause.bats b/test/system/080-pause.bats index 57f390a74..deaf8d831 100644 --- a/test/system/080-pause.bats +++ b/test/system/080-pause.bats @@ -27,7 +27,7 @@ load helpers is "$output" "paused" "podman inspect .State.Status" sleep 3 run_podman ps -a --format '{{.ID}} {{.Names}} {{.Status}}' - is "$output" "${cid:0:12} $cname paused" "podman ps on paused container" + is "$output" "${cid:0:12} $cname Paused" "podman ps on paused container" run_podman unpause $cname run_podman ps -a --format '{{.ID}} {{.Names}} {{.Status}}' is "$output" "${cid:0:12} $cname Up .*" "podman ps on resumed container" -- cgit v1.2.3-54-g00ecf