diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-19 20:40:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-19 20:40:37 +0100 |
commit | 579fc0f7eb3928a076b0a5d1d6ec444205a0a930 (patch) | |
tree | 739a21529954fb0009e5fa2a785d753389e344b4 /test/e2e | |
parent | 0d4bfb013108f836dbc6369d38b01b6e92d6141d (diff) | |
parent | eadaa5fb420e3e8e6b0e277ac88cc528f9950ee4 (diff) | |
download | podman-579fc0f7eb3928a076b0a5d1d6ec444205a0a930.tar.gz podman-579fc0f7eb3928a076b0a5d1d6ec444205a0a930.tar.bz2 podman-579fc0f7eb3928a076b0a5d1d6ec444205a0a930.zip |
Merge pull request #2183 from baude/remoteinspect
podman-remote inspect
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/common_test.go | 19 | ||||
-rw-r--r-- | test/e2e/inspect_test.go | 6 | ||||
-rw-r--r-- | test/e2e/libpod_suite_remoteclient_test.go | 8 | ||||
-rw-r--r-- | test/e2e/libpod_suite_test.go | 9 |
4 files changed, 23 insertions, 19 deletions
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 +} diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index 38c50da14..e5c471bf9 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -1,5 +1,3 @@ -// +build !remoteclient - package integration import ( @@ -45,6 +43,7 @@ var _ = Describe("Podman inspect", func() { }) It("podman inspect bogus container", func() { + SkipIfRemote() session := podmanTest.Podman([]string{"inspect", "foobar4321"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Not(Equal(0))) @@ -68,6 +67,7 @@ var _ = Describe("Podman inspect", func() { }) It("podman inspect container with size", func() { + SkipIfRemote() _, ec, _ := podmanTest.RunLsContainer("") Expect(ec).To(Equal(0)) @@ -79,6 +79,7 @@ var _ = Describe("Podman inspect", func() { }) It("podman inspect container and image", func() { + SkipIfRemote() ls, ec, _ := podmanTest.RunLsContainer("") Expect(ec).To(Equal(0)) cid := ls.OutputToString() @@ -90,6 +91,7 @@ var _ = Describe("Podman inspect", func() { }) It("podman inspect -l with additional input should fail", func() { + SkipIfRemote() result := podmanTest.Podman([]string{"inspect", "-l", "1234foobar"}) result.WaitWithDefaultTimeout() Expect(result.ExitCode()).To(Equal(125)) diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go index cad4401f8..660c2f639 100644 --- a/test/e2e/libpod_suite_remoteclient_test.go +++ b/test/e2e/libpod_suite_remoteclient_test.go @@ -55,10 +55,10 @@ func (p *PodmanTestIntegration) RunLsContainer(name string) (*PodmanSessionInteg // InspectImageJSON takes the session output of an inspect // image and returns json -func (s *PodmanSessionIntegration) InspectImageJSON() []inspect.ImageData { - // TODO - return nil -} +//func (s *PodmanSessionIntegration) InspectImageJSON() []inspect.ImageData { +// // TODO +// return nil +//} func (p *PodmanTestIntegration) setDefaultRegistriesConfigEnv() { defaultFile := filepath.Join(INTEGRATION_ROOT, "test/registries.conf") diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index a7ce14239..48304af7f 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -118,15 +118,6 @@ func (s *PodmanSessionIntegration) InspectPodToJSON() libpod.PodInspect { return i } -// 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 -} - // CreatePod creates a pod with no infra container // it optionally takes a pod name func (p *PodmanTestIntegration) CreatePod(name string) (*PodmanSessionIntegration, int, string) { |