mirror of
https://github.com/containers/podman.git
synced 2025-10-19 04:03:23 +08:00
podman-remote inspect
base enablement of the inspect command. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -1,17 +1,19 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"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"
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user