diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-15 07:49:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-15 07:49:55 -0800 |
commit | 077156d45cfea915cc249e92a5a45280e5ed71e1 (patch) | |
tree | 10dcf43431d1830c2d9c43bc33f46317ba5bf7c7 /test | |
parent | 500fb2ca4c23288f5086d0ceede7166d3d376c1f (diff) | |
parent | f9f72823ad5f773ee50b9e438c922a9cf0f3edcb (diff) | |
download | podman-077156d45cfea915cc249e92a5a45280e5ed71e1.tar.gz podman-077156d45cfea915cc249e92a5a45280e5ed71e1.tar.bz2 podman-077156d45cfea915cc249e92a5a45280e5ed71e1.zip |
Merge pull request #2156 from baude/remotermi
podman remote client -- add rmi
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/exists_test.go | 10 | ||||
-rw-r--r-- | test/e2e/libpod_suite_remoteclient_test.go | 6 | ||||
-rw-r--r-- | test/e2e/libpod_suite_test.go | 2 | ||||
-rw-r--r-- | test/e2e/rmi_test.go | 6 |
4 files changed, 19 insertions, 5 deletions
diff --git a/test/e2e/exists_test.go b/test/e2e/exists_test.go index b5c91cc8d..c4b5e4968 100644 --- a/test/e2e/exists_test.go +++ b/test/e2e/exists_test.go @@ -1,5 +1,3 @@ -// +build !remoteclient - package integration import ( @@ -51,6 +49,7 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(1)) }) It("podman container exists in local storage by name", func() { + SkipIfRemote() setup := podmanTest.RunTopContainer("foobar") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -60,6 +59,7 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(0)) }) It("podman container exists in local storage by container ID", func() { + SkipIfRemote() setup := podmanTest.RunTopContainer("") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -70,6 +70,7 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(0)) }) It("podman container exists in local storage by short container ID", func() { + SkipIfRemote() setup := podmanTest.RunTopContainer("") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -80,12 +81,14 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(0)) }) It("podman container does not exist in local storage", func() { + SkipIfRemote() session := podmanTest.Podman([]string{"container", "exists", "foobar"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(1)) }) It("podman pod exists in local storage by name", func() { + SkipIfRemote() setup, rc, _ := podmanTest.CreatePod("foobar") setup.WaitWithDefaultTimeout() Expect(rc).To(Equal(0)) @@ -95,6 +98,7 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(0)) }) It("podman pod exists in local storage by container ID", func() { + SkipIfRemote() setup, rc, podID := podmanTest.CreatePod("") setup.WaitWithDefaultTimeout() Expect(rc).To(Equal(0)) @@ -104,6 +108,7 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(0)) }) It("podman pod exists in local storage by short container ID", func() { + SkipIfRemote() setup, rc, podID := podmanTest.CreatePod("") setup.WaitWithDefaultTimeout() Expect(rc).To(Equal(0)) @@ -113,6 +118,7 @@ var _ = Describe("Podman image|container exists", func() { Expect(session.ExitCode()).To(Equal(0)) }) It("podman pod does not exist in local storage", func() { + SkipIfRemote() session := podmanTest.Podman([]string{"pod", "exists", "foobar"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(1)) diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go index 211fc1ebc..cad4401f8 100644 --- a/test/e2e/libpod_suite_remoteclient_test.go +++ b/test/e2e/libpod_suite_remoteclient_test.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/inspect" + "github.com/onsi/ginkgo" "io/ioutil" "os" "os/exec" @@ -13,13 +14,16 @@ import ( "strings" ) +func SkipIfRemote() { + ginkgo.Skip("This function is not enabled for remote podman") +} + // Cleanup cleans up the temporary store func (p *PodmanTestIntegration) Cleanup() { p.StopVarlink() // TODO // Stop all containers // Rm all containers - // Rm all images if err := os.RemoveAll(p.TempDir); err != nil { fmt.Printf("%q\n", err) diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 429700bed..a7ce14239 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -19,6 +19,8 @@ import ( "github.com/onsi/gomega/gexec" ) +func SkipIfRemote() {} + // Podman is the exec call to podman on the filesystem func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration { podmanSession := p.PodmanBase(args) diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index 81895f439..c160e1bc5 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -1,5 +1,3 @@ -// +build !remoteclient - package integration import ( @@ -113,6 +111,7 @@ var _ = Describe("Podman rmi", func() { }) It("podman rmi image that is a parent of another image", func() { + SkipIfRemote() session := podmanTest.Podman([]string{"rmi", "-fa"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -150,6 +149,7 @@ var _ = Describe("Podman rmi", func() { }) It("podman rmi image that is created from another named imaged", func() { + SkipIfRemote() session := podmanTest.Podman([]string{"rmi", "-fa"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -185,6 +185,7 @@ var _ = Describe("Podman rmi", func() { }) It("podman rmi with cached images", func() { + SkipIfRemote() session := podmanTest.Podman([]string{"rmi", "-fa"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -254,6 +255,7 @@ var _ = Describe("Podman rmi", func() { }) It("podman rmi -a with parent|child images", func() { + SkipIfRemote() dockerfile := `FROM docker.io/library/alpine:latest AS base RUN touch /1 ENV LOCAL=/1 |