From fe404959edc2568f6b4e4602b4d5552fc416d510 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 10 Oct 2024 15:30:30 +0200 Subject: [PATCH] test: update timezone checks 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 --- test/e2e/containers_conf_test.go | 5 +++-- test/system/030-run.bats | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index 469558b718..94e61468c3 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -346,10 +346,11 @@ 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'"}) + // Arizona does not observe DST so this command is safe at all times of the year + session = podmanTest.Podman([]string{"run", "--tz", "America/Phoenix", ALPINE, "date", "+'%H %Z'"}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) - Expect(session.OutputToString()).To(ContainSubstring("EST")) + Expect(session.OutputToString()).To(ContainSubstring("MST")) }) It("add umask", func() { diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 117e90cc48..cc2833c5d0 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -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 08: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-