Skip to content

Commit

Permalink
test/system: add regression test for TZDIR local issue
Browse files Browse the repository at this point in the history
Regression test for containers#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>
(cherry picked from commit fb3a0e9)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
  • Loading branch information
Luap99 committed Nov 7, 2024
1 parent ac59fb9 commit d852c58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d852c58

Please sign in to comment.