diff options
author | Niall Crowe <nicrowe@redhat.com> | 2022-04-29 11:42:20 +0100 |
---|---|---|
committer | Niall Crowe <nicrowe@redhat.com> | 2022-05-04 12:52:27 +0100 |
commit | ccd576504e7fb578add8f5390fa8ceb41dd1d9d4 (patch) | |
tree | 81afdba0ebf6835a2cfc34ea2221e3ee3404b5ff /test/system | |
parent | 3d84661195aa8fbf3dab67375099cb991fd7fe81 (diff) | |
download | podman-ccd576504e7fb578add8f5390fa8ceb41dd1d9d4.tar.gz podman-ccd576504e7fb578add8f5390fa8ceb41dd1d9d4.tar.bz2 podman-ccd576504e7fb578add8f5390fa8ceb41dd1d9d4.zip |
play kube default log driver
The default log driver is not used when using play kube
without --log-driver. The LogDriver function needs to
be called in order to use the default log driver.
fixes #13781
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/700-play.bats | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/system/700-play.bats b/test/system/700-play.bats index b0624cbf2..7988b26a4 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -278,3 +278,20 @@ status: {} run_podman 125 play kube - < $PODMAN_TMPDIR/test.yaml assert "$output" =~ "invalid annotation \"test\"=\"$RANDOMSTRING\"" "Expected to fail with annotation length greater than 63" } + +@test "podman play kube - default log driver" { + TESTDIR=$PODMAN_TMPDIR/testdir + mkdir -p $TESTDIR + echo "$testYaml" | sed "s|TESTDIR|${TESTDIR}|g" > $PODMAN_TMPDIR/test.yaml + # Get the default log driver + run_podman info --format "{{.Host.LogDriver}}" + default_driver=$output + + # Make sure that the default log driver is used + run_podman play kube $PODMAN_TMPDIR/test.yaml + run_podman inspect --format "{{.HostConfig.LogConfig.Type}}" test_pod-test + is "$output" "$default_driver" "play kube uses default log driver" + + run_podman stop -a -t 0 + run_podman pod rm -t 0 -f test_pod +} |