From 40eb0453adb85649daacf822ccbb81ade33a97e2 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 18 Jun 2019 11:18:53 -0600 Subject: fix broken healthcheck tests Four of the healthcheck tests were completely broken. They were written with the option '--healthcheck-cmd' which is not an option (it should be '--healthcheck-command', with 'command' as a full word). The tests were merely checking exit code, not error message, so of course they failed. I have fixed the command line and added checks for the expected diagnostic. (Side note: do not write tests that check exit code but nothing else. This should not need to be said). One of the four tests was invalid: --healthcheck-interval 0.5s. Per Brent: initially i was going to restrict sub one-second intervals That test has been removed. It would probably be a good idea for a future PR to add some validation such as preventing negative values, but that's left as an exercise for later. Also: grammar fix in an error message. Caught by my ginkgo log greasemonkey script, which highlights 'Error' messages and grabbed my attention. Signed-off-by: Ed Santiago --- cmd/podman/shared/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') 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 -- cgit v1.2.3-54-g00ecf