diff options
-rw-r--r-- | pkg/domain/infra/tunnel/containers.go | 23 | ||||
-rw-r--r-- | test/e2e/images_test.go | 1 | ||||
-rw-r--r-- | test/e2e/pause_test.go | 1 | ||||
-rw-r--r-- | test/e2e/rm_test.go | 1 | ||||
-rw-r--r-- | test/e2e/stop_test.go | 1 |
5 files changed, 19 insertions, 8 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index d02c54e76..5b2c779b7 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -87,10 +87,25 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin } for _, c := range ctrs { report := entities.StopReport{Id: c.ID} - report.Err = containers.Stop(ic.ClientCxt, c.ID, &options.Timeout) - // TODO we need to associate errors returned by http with common - // define.errors so that we can equity tests. this will allow output - // to be the same as the native client + if err = containers.Stop(ic.ClientCxt, c.ID, &options.Timeout); err != nil { + // These first two are considered non-fatal under the right conditions + if errors.Cause(err).Error() == define.ErrCtrStopped.Error() { + logrus.Debugf("Container %s is already stopped", c.ID) + reports = append(reports, &report) + continue + } else if options.All && errors.Cause(err).Error() == define.ErrCtrStateInvalid.Error() { + logrus.Debugf("Container %s is not running, could not stop", c.ID) + reports = append(reports, &report) + continue + } + + // TODO we need to associate errors returned by http with common + // define.errors so that we can equity tests. this will allow output + // to be the same as the native client + report.Err = err + reports = append(reports, &report) + continue + } reports = append(reports, &report) } return reports, nil diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index 1715cf8c1..1b23aba36 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -131,7 +131,6 @@ var _ = Describe("Podman images", func() { }) It("podman images filter by image name", func() { - Skip(v2remotefail) podmanTest.RestoreAllArtifacts() session := podmanTest.PodmanNoCache([]string{"images", "-q", ALPINE}) session.WaitWithDefaultTimeout() diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go index 2faa4bc3f..149a2e28a 100644 --- a/test/e2e/pause_test.go +++ b/test/e2e/pause_test.go @@ -297,7 +297,6 @@ var _ = Describe("Podman pause", func() { }) It("Unpause a bunch of running containers", func() { - Skip(v2remotefail) for i := 0; i < 3; i++ { name := fmt.Sprintf("test%d", i) run := podmanTest.Podman([]string{"run", "-dt", "--name", name, nginx}) diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go index 552683d8c..87e3de922 100644 --- a/test/e2e/rm_test.go +++ b/test/e2e/rm_test.go @@ -43,7 +43,6 @@ var _ = Describe("Podman rm", func() { }) It("podman rm refuse to remove a running container", func() { - Skip(v2remotefail) session := podmanTest.RunTopContainer("") session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go index 8e49e3bd0..cd78a54e1 100644 --- a/test/e2e/stop_test.go +++ b/test/e2e/stop_test.go @@ -217,7 +217,6 @@ var _ = Describe("Podman stop", func() { }) It("podman stop all containers with one created", func() { - Skip(v2remotefail) session := podmanTest.RunTopContainer("test1") session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) |