Skip to content

Commit

Permalink
test: update timezone checks
Browse files Browse the repository at this point in the history
In debian EST and MST7MDT are gone by default and moved to a special
package[1], instead of also installing that in the images lets use
different timezones in the test.

[1] https://salsa.debian.org/glibc-team/tzdata/-/commit/42c0008f86a5a53e1a37fefa93fdd3685313e86f

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Oct 10, 2024
1 parent a79fec5 commit 3a8dfca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/e2e/containers_conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ var _ = Describe("Verify podman containers.conf usage", func() {
Expect(session.OutputToString()).To(ContainSubstring("HST"))

// verify flag still overrides
session = podmanTest.Podman([]string{"run", "--tz", "EST", ALPINE, "date", "+'%H %Z'"})
session = podmanTest.Podman([]string{"run", "--tz", "GMT", ALPINE, "date", "+'%H %Z'"})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
Expect(session.OutputToString()).To(ContainSubstring("EST"))
Expect(session.OutputToString()).To(ContainSubstring("GMT"))
})

It("add umask", func() {
Expand Down
4 changes: 2 additions & 2 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ json-file | f
is "$output" "Sun Sep 13 12:26:40 UTC 2020" "podman run with no TZ"

# Multiple --tz options; confirm that the last one wins
run_podman run --rm --tz=US/Eastern --tz=Iceland --tz=MST7MDT \
run_podman run --rm --tz=US/Eastern --tz=Iceland --tz=America/New_York \
$IMAGE date -r $testfile
is "$output" "Sun Sep 13 06:26:40 MDT 2020" "podman run with --tz=MST7MDT"
is "$output" "Sun Sep 13 06:26:40 EDT 2020" "podman run with --tz=America/New_York"

# --tz=local pays attention to /etc/localtime, not $TZ. We set TZ anyway,
# to make sure podman ignores it; and, because this test is locale-
Expand Down

0 comments on commit 3a8dfca

Please sign in to comment.