diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/checkpoint_test.go | 2 | ||||
-rw-r--r-- | test/e2e/common_test.go | 17 | ||||
-rw-r--r-- | test/e2e/pause_test.go | 4 | ||||
-rw-r--r-- | test/e2e/rm_test.go | 2 | ||||
-rw-r--r-- | test/e2e/rmi_test.go | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go index 8f3cf5c10..0261acbd9 100644 --- a/test/e2e/checkpoint_test.go +++ b/test/e2e/checkpoint_test.go @@ -147,7 +147,7 @@ var _ = Describe("Podman checkpoint", func() { result = podmanTest.Podman([]string{"rm", cid}) result.WaitWithDefaultTimeout() - Expect(result.ExitCode()).To(Equal(125)) + Expect(result.ExitCode()).To(Equal(2)) Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1)) result = podmanTest.Podman([]string{"rm", "-f", cid}) diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 22eb94972..b43938616 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -111,10 +111,7 @@ var _ = SynchronizedBeforeSuite(func() []byte { } for _, image := range CACHE_IMAGES { - if err := podman.CreateArtifact(image); err != nil { - fmt.Printf("%q\n", err) - os.Exit(1) - } + podman.createArtifact(image) } // If running localized tests, the cache dir is created and populated. if the @@ -287,25 +284,26 @@ func (p *PodmanTestIntegration) RestoreAllArtifacts() error { return nil } -// CreateArtifact creates a cached image in the artifact dir -func (p *PodmanTestIntegration) CreateArtifact(image string) error { +// createArtifact creates a cached image in the artifact dir +func (p *PodmanTestIntegration) createArtifact(image string) { if os.Getenv("NO_TEST_CACHE") != "" { - return nil + return } - fmt.Printf("Caching %s...", image) dest := strings.Split(image, "/") destName := fmt.Sprintf("/tmp/%s.tar", strings.Replace(strings.Join(strings.Split(dest[len(dest)-1], "/"), ""), ":", "-", -1)) + fmt.Printf("Caching %s at %s...", image, destName) if _, err := os.Stat(destName); os.IsNotExist(err) { pull := p.PodmanNoCache([]string{"pull", image}) pull.Wait(90) + Expect(pull.ExitCode()).To(Equal(0)) save := p.PodmanNoCache([]string{"save", "-o", destName, image}) save.Wait(90) + Expect(save.ExitCode()).To(Equal(0)) fmt.Printf("\n") } else { fmt.Printf(" already exists.\n") } - return nil } // InspectImageJSON takes the session output of an inspect @@ -322,6 +320,7 @@ func (p *PodmanTestIntegration) InspectContainer(name string) []libpod.InspectCo cmd := []string{"inspect", name} session := p.Podman(cmd) session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) return session.InspectContainerToJSON() } diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go index 01fb6d91b..455f60937 100644 --- a/test/e2e/pause_test.go +++ b/test/e2e/pause_test.go @@ -126,7 +126,7 @@ var _ = Describe("Podman pause", func() { result = podmanTest.Podman([]string{"rm", cid}) result.WaitWithDefaultTimeout() - Expect(result.ExitCode()).To(Equal(125)) + Expect(result.ExitCode()).To(Equal(2)) Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0)) Expect(podmanTest.GetContainerStatus()).To(ContainSubstring(pausedState)) @@ -179,7 +179,7 @@ var _ = Describe("Podman pause", func() { result = podmanTest.Podman([]string{"rm", cid}) result.WaitWithDefaultTimeout() - Expect(result.ExitCode()).To(Equal(125)) + Expect(result.ExitCode()).To(Equal(2)) Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1)) result = podmanTest.Podman([]string{"rm", "-f", cid}) diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go index 2dbabbf6a..8ee7dc750 100644 --- a/test/e2e/rm_test.go +++ b/test/e2e/rm_test.go @@ -49,7 +49,7 @@ var _ = Describe("Podman rm", func() { result := podmanTest.Podman([]string{"rm", cid}) result.WaitWithDefaultTimeout() - Expect(result.ExitCode()).To(Equal(125)) + Expect(result.ExitCode()).To(Equal(2)) }) It("podman rm created container", func() { diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index 1b0329a83..d4e2407ec 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -145,7 +145,7 @@ var _ = Describe("Podman rmi", func() { session = podmanTest.PodmanNoCache([]string{"rmi", "-f", untaggedImg}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Not(Equal(0))) + Expect(session.ExitCode()).To(Equal(2)) }) It("podman rmi image that is created from another named imaged", func() { |