diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-19 19:34:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 19:34:00 +0200 |
commit | 360adac37443bdf50959e19e2e5a7e7608348249 (patch) | |
tree | b9c37728e7f57de3a3a05bc0c7ca282661fd1324 | |
parent | c60d7ca5d6725b2b77ba26ab2d4bec6af7c09bcd (diff) | |
parent | 40eb0453adb85649daacf822ccbb81ade33a97e2 (diff) | |
download | podman-360adac37443bdf50959e19e2e5a7e7608348249.tar.gz podman-360adac37443bdf50959e19e2e5a7e7608348249.tar.bz2 podman-360adac37443bdf50959e19e2e5a7e7608348249.zip |
Merge pull request #3366 from edsantiago/test_typo_fixes
fix broken healthcheck tests
-rw-r--r-- | cmd/podman/shared/create.go | 2 | ||||
-rw-r--r-- | test/e2e/run_test.go | 15 |
2 files changed, 7 insertions, 10 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 7cf230605..eee5f515d 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -811,7 +811,7 @@ func makeHealthCheckFromCli(c *GenericCLIResults) (*manifest.Schema2HealthConfig return nil, errors.Wrapf(err, "invalid healthcheck-start-period %s", inStartPeriod) } if startPeriodDuration < time.Duration(0) { - return nil, errors.New("healthcheck-start-period must be a 0 seconds or greater") + return nil, errors.New("healthcheck-start-period must be 0 seconds or greater") } hc.StartPeriod = startPeriodDuration diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 3ba3c2bb3..3fc628589 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -712,28 +712,25 @@ USER mail` Expect(session.OutputToString()).To(Not(ContainSubstring("/dev/shm type tmpfs (ro,"))) }) - It("podman run with bad healthcheck interval", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-interval", "0.5s", ALPINE, "top"}) - session.Wait() - Expect(session.ExitCode()).ToNot(Equal(0)) - }) - It("podman run with bad healthcheck retries", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-retries", "0", ALPINE, "top"}) + session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-retries", "0", ALPINE, "top"}) session.Wait() Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-retries must be greater than 0")) }) It("podman run with bad healthcheck timeout", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-timeout", "0s", ALPINE, "top"}) + session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-timeout", "0s", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-timeout must be at least 1 second")) }) It("podman run with bad healthcheck start-period", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-start-period", "-1s", ALPINE, "top"}) + session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-start-period", "-1s", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-start-period must be 0 seconds or greater")) }) It("podman run with --add-host and --no-hosts fails", func() { |