diff options
author | Yiqiao Pu <ypu@redhat.com> | 2020-10-21 21:24:04 +0800 |
---|---|---|
committer | Yiqiao Pu <ypu@redhat.com> | 2020-10-22 14:38:28 +0800 |
commit | 8e66795530e91ebfe211e6ac26180e70d68e7953 (patch) | |
tree | 5177b0d6abfd7afe9ecd2c7e53b0d4ea8abbd214 /test/system/030-run.bats | |
parent | b4a10538e1a094f407b581572f8cb3e55656d470 (diff) | |
download | podman-8e66795530e91ebfe211e6ac26180e70d68e7953.tar.gz podman-8e66795530e91ebfe211e6ac26180e70d68e7953.tar.bz2 podman-8e66795530e91ebfe211e6ac26180e70d68e7953.zip |
Tests: Check different log driver can work with podman logs
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 <ypu@redhat.com>
Diffstat (limited to 'test/system/030-run.bats')
-rw-r--r-- | test/system/030-run.bats | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 9f4037730..564de6a69 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -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") |