diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-07 08:52:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 08:52:23 -0500 |
commit | b1dcd025c6118725b35bd89f31a77ed63528db7d (patch) | |
tree | f7d87d2ed51d3c79ff720ac365075f350ab7daaf /test/system | |
parent | f6b0abfa8a6604ec18b22da787f7edc67eb99fe5 (diff) | |
parent | 3cf64a8e9a52b4488a9161305d173f4808673c1a (diff) | |
download | podman-b1dcd025c6118725b35bd89f31a77ed63528db7d.tar.gz podman-b1dcd025c6118725b35bd89f31a77ed63528db7d.tar.bz2 podman-b1dcd025c6118725b35bd89f31a77ed63528db7d.zip |
Merge pull request #13129 from flouthoc/healthcheck-session-read-from-pipe
healthcheck, libpod: Read healthcheck event output from os pipe
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/220-healthcheck.bats | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/system/220-healthcheck.bats b/test/system/220-healthcheck.bats index 1d4a2ea7e..6159a2807 100644 --- a/test/system/220-healthcheck.bats +++ b/test/system/220-healthcheck.bats @@ -18,7 +18,7 @@ function _check_health { # (kludge to deal with parse_table and empty strings) if [ "$expect" = "''" ]; then expect=""; fi - actual=$(jq -r ".$field" <<<"$output") + actual=$(jq ".$field" <<<"$output") is "$actual" "$expect" "$testname - .State.Healthcheck.$field" done } @@ -77,10 +77,10 @@ EOF is "$output" "" "output from 'podman healthcheck run'" _check_health "All healthy" " -Status | healthy +Status | \"healthy\" FailingStreak | 0 Log[-1].ExitCode | 0 -Log[-1].Output | +Log[-1].Output | \"Life is Good on stdout\\\nLife is Good on stderr\" " # Force a failure @@ -88,19 +88,19 @@ Log[-1].Output | sleep 2 _check_health "First failure" " -Status | healthy +Status | \"healthy\" FailingStreak | [123] Log[-1].ExitCode | 1 -Log[-1].Output | +Log[-1].Output | \"Uh-oh on stdout!\\\nUh-oh on stderr!\" " # After three successive failures, container should no longer be healthy sleep 5 _check_health "Three or more failures" " -Status | unhealthy +Status | \"unhealthy\" FailingStreak | [3456] Log[-1].ExitCode | 1 -Log[-1].Output | +Log[-1].Output | \"Uh-oh on stdout!\\\nUh-oh on stderr!\" " # healthcheck should now fail, with exit status 1 and 'unhealthy' output |