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/e2e/init_test.go | 10 +++++----- test/e2e/pod_pause_test.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test/e2e') diff --git a/test/e2e/init_test.go b/test/e2e/init_test.go index 788b67154..729cc7a5a 100644 --- a/test/e2e/init_test.go +++ b/test/e2e/init_test.go @@ -57,7 +57,7 @@ var _ = Describe("Podman init", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) conData := result.InspectContainerToJSON() - Expect(conData[0].State.Status).To(Equal("created")) + Expect(conData[0].State.Status).To(Equal("initialized")) }) It("podman init single container by name", func() { @@ -72,7 +72,7 @@ var _ = Describe("Podman init", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) conData := result.InspectContainerToJSON() - Expect(conData[0].State.Status).To(Equal("created")) + Expect(conData[0].State.Status).To(Equal("initialized")) }) It("podman init latest container", func() { @@ -87,7 +87,7 @@ var _ = Describe("Podman init", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) conData := result.InspectContainerToJSON() - Expect(conData[0].State.Status).To(Equal("created")) + Expect(conData[0].State.Status).To(Equal("initialized")) }) It("podman init all three containers, one running", func() { @@ -107,12 +107,12 @@ var _ = Describe("Podman init", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) conData := result.InspectContainerToJSON() - Expect(conData[0].State.Status).To(Equal("created")) + Expect(conData[0].State.Status).To(Equal("initialized")) result2 := podmanTest.Podman([]string{"inspect", "test2"}) result2.WaitWithDefaultTimeout() Expect(result2).Should(Exit(0)) conData2 := result2.InspectContainerToJSON() - Expect(conData2[0].State.Status).To(Equal("created")) + Expect(conData2[0].State.Status).To(Equal("initialized")) result3 := podmanTest.Podman([]string{"inspect", "test3"}) result3.WaitWithDefaultTimeout() Expect(result3).Should(Exit(0)) diff --git a/test/e2e/pod_pause_test.go b/test/e2e/pod_pause_test.go index 7c092ba8e..daf706ec4 100644 --- a/test/e2e/pod_pause_test.go +++ b/test/e2e/pod_pause_test.go @@ -16,7 +16,7 @@ var _ = Describe("Podman pod pause", func() { podmanTest *PodmanTestIntegration ) - pausedState := "paused" + pausedState := "Paused" BeforeEach(func() { SkipIfRootlessCgroupsV1("Pause is not supported in cgroups v1") -- cgit v1.2.3-54-g00ecf