From 4b37d4d5af50b67742e5f3097075e7493488d91a Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 2 Jun 2020 17:10:57 -0400 Subject: Fix a segfault in `podman inspect -l` w/ no containers We also need to rework container/image inspect to be separate, but that can happen in another PR. Fixes #6472 Signed-off-by: Matthew Heon --- test/e2e/inspect_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index 77cfe4fd3..786f8fbb0 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -171,4 +171,12 @@ var _ = Describe("Podman inspect", func() { Expect(imageData[0].HealthCheck.Interval).To(BeNumerically("==", 60000000000)) Expect(imageData[0].HealthCheck.Test).To(Equal([]string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"})) }) + + It("podman inspect --latest with no container fails", func() { + SkipIfRemote() + + session := podmanTest.Podman([]string{"inspect", "--latest"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + }) }) -- cgit v1.2.3-54-g00ecf