From 2a5c235f789e866cb2c1d0fd54cc23c13bc1fc69 Mon Sep 17 00:00:00 2001 From: Neville Cain Date: Fri, 27 Dec 2019 23:42:38 +0100 Subject: Ensure SizeRw is shown when a user does 'inspect --size -t container'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, if a user requests the size on a container (inspect --size -t container), the SizeRw does not show up if the value is 0. It's because InspectContainerData is defined as int64 and there is an omit when empty. We do want to display it even if the value is empty. I have changed the type of SizeRw to be a pointer to an int64 instead of an int64. It will allow us todistinguish the empty value to the missing value. I updated the test "podman inspect container with size" to ensure we check thatSizeRw is displayed correctly. Closes #4744 Signed-off-by: NevilleC --- test/e2e/inspect_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'test/e2e') diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index 2d81ef0d8..9d23384ea 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -86,6 +86,7 @@ var _ = Describe("Podman inspect", func() { Expect(result.ExitCode()).To(Equal(0)) conData := result.InspectContainerToJSON() Expect(conData[0].SizeRootFs).To(BeNumerically(">", 0)) + Expect(*conData[0].SizeRw).To(BeNumerically(">=", 0)) }) It("podman inspect container and image", func() { -- cgit v1.2.3-54-g00ecf