diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-06 13:28:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 13:28:20 -0400 |
commit | 9532509c50113ac9470108e3492e2769bac533e8 (patch) | |
tree | 4d691205d2c574b6c7ab6eb3c62937b327898f58 /test/e2e/run_test.go | |
parent | 9eac75a967e3459b32b1acd220afb49b60f5e5aa (diff) | |
parent | 9a1543caec75a7b02dd2ec9a1111756bb1716454 (diff) | |
download | podman-9532509c50113ac9470108e3492e2769bac533e8.tar.gz podman-9532509c50113ac9470108e3492e2769bac533e8.tar.bz2 podman-9532509c50113ac9470108e3492e2769bac533e8.zip |
Merge pull request #6836 from ashley-cui/tzlibpod
Add --tz flag to create, run
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r-- | test/e2e/run_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index e7b68c60f..f49770727 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1047,4 +1047,29 @@ USER mail` Expect(session.ExitCode()).To(Equal(0)) Expect(strings.Contains(session.OutputToString(), groupName)).To(BeTrue()) }) + + It("podman run --tz", func() { + session := podmanTest.Podman([]string{"run", "--tz", "foo", "--rm", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"run", "--tz", "America", "--rm", ALPINE, "date"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"run", "--tz", "Pacific/Honolulu", "--rm", ALPINE, "date", "+'%H %Z'"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("HST")) + + session = podmanTest.Podman([]string{"run", "--tz", "local", "--rm", ALPINE, "date", "+'%H %Z'"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + t := time.Now() + z, _ := t.Zone() + h := strconv.Itoa(t.Hour()) + Expect(session.OutputToString()).To(ContainSubstring(z)) + Expect(session.OutputToString()).To(ContainSubstring(h)) + + }) }) |