Skip to content

Commit

Permalink
Tests: Check different log driver can work with podman logs
Browse files Browse the repository at this point in the history
Add a check step in podman run --log-driver test. Prefer to add
it here as it already has a loop to cover all different drivers
in this test.

Signed-off-by: Yiqiao Pu <[email protected]>
  • Loading branch information
ypu committed Oct 22, 2020
1 parent b4a1053 commit 8e66795
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,17 @@ json-file | f
else
is "$output" "" "LogPath (driver=$driver)"
fi

if [[ $driver != 'none' ]]; then
run_podman logs myctr
is "$output" "$msg" "check that podman logs works as expected"
else
run_podman 125 logs myctr
if ! is_remote; then
is "$output" ".*this container is using the 'none' log driver, cannot read logs.*" \
"podman logs does not work with none log driver"
fi
fi
run_podman rm myctr
done < <(parse_table "$tests")

Expand Down

0 comments on commit 8e66795

Please sign in to comment.