podman-remote inspect

base enablement of the inspect command.

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-01-17 08:43:34 -06:00
parent f897cccbde
commit eadaa5fb42
20 changed files with 344 additions and 111 deletions

View File

@ -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
}