test/system: add regression test for TZDIR local issue

Regression test for #23550. Setting the TZDIR env should make no
difference for the local timezone as this is not a real timezone name
that is resolved from that directory.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-11-01 14:05:06 +01:00
parent f6af35c695
commit fb3a0e93a8

View File

@ -534,6 +534,11 @@ json-file | f
expect="$output"
TZ=Pacific/Chatham run_podman run --rm --tz=local $IMAGE date -Iseconds -r $testfile
is "$output" "$expect" "podman run with --tz=local, matches host"
# Force a TZDIR env as local should not try to use the TZDIR at all, #23550.
# This used to fail with: stat /usr/share/zoneinfo/local: no such file or directory.
TZDIR=/usr/share/zoneinfo run_podman run --rm --tz=local $IMAGE date -Iseconds -r $testfile
is "$output" "$expect" "podman run with --tz=local ignored TZDIR"
}
# bats test_tags=ci:parallel