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 <[email protected]>
  • Loading branch information
Luap99 committed Nov 4, 2024
1 parent e55fc28 commit 7b09dc2
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 7b09dc2

Please sign in to comment.