From eadaa5fb420e3e8e6b0e277ac88cc528f9950ee4 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 17 Jan 2019 08:43:34 -0600 Subject: podman-remote inspect base enablement of the inspect command. Signed-off-by: baude --- test/e2e/common_test.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'test/e2e/common_test.go') diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index e00a59b7f..a75601b65 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -1,17 +1,19 @@ package integration import ( + "encoding/json" "fmt" - . "github.com/containers/libpod/test/utils" "os" "os/exec" + "path/filepath" + "strings" + "testing" + "github.com/containers/libpod/pkg/inspect" + . "github.com/containers/libpod/test/utils" "github.com/containers/storage/pkg/reexec" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "path/filepath" - "strings" - "testing" ) var ( @@ -227,3 +229,12 @@ func (p *PodmanTestIntegration) CreateArtifact(image string) error { } return nil } + +// InspectImageJSON takes the session output of an inspect +// image and returns json +func (s *PodmanSessionIntegration) InspectImageJSON() []inspect.ImageData { + var i []inspect.ImageData + err := json.Unmarshal(s.Out.Contents(), &i) + Expect(err).To(BeNil()) + return i +} -- cgit v1.2.3-54-g00ecf