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/apiv2/20-containers.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/apiv2/20-containers.at') diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index 3d67650d2..72003984f 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -156,7 +156,7 @@ podman create -t -i --name myctr $IMAGE ls # Check configuration before initializing t GET libpod/containers/myctr/json 200 \ .Id~[0-9a-f]\\{64\\} \ - .State.Status="configured" \ + .State.Status="created" \ .State.Pid=0 \ .ResolvConfPath="" \ .HostnamePath="" \ @@ -172,7 +172,7 @@ t POST libpod/containers/myctr/init 204 # Check configuration after initializing t GET libpod/containers/myctr/json 200 \ .Id~[0-9a-f]\\{64\\} \ - .State.Status="created" \ + .State.Status="initialized" \ .State.Pid~[0-9]\\{1\,8\\} \ .ResolvConfPath=$userdata_path/resolv.conf \ .HostnamePath=$userdata_path/hostname \ -- cgit v1.2.3-54-g00ecf