diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-13 09:53:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-13 09:53:56 -0500 |
commit | 797f1ea8cd0b7f4f85df4cf069bcd64c37a8ed1d (patch) | |
tree | a4a9b7d4f8ea7ce9ae9569c04374d54a0533cafd /test/e2e/ps_test.go | |
parent | 001059259d0bb3acc70d943ebe13477fb9014206 (diff) | |
parent | f36d860385a1d33a2aabea7b4848ef6217398c3c (diff) | |
download | podman-797f1ea8cd0b7f4f85df4cf069bcd64c37a8ed1d.tar.gz podman-797f1ea8cd0b7f4f85df4cf069bcd64c37a8ed1d.tar.bz2 podman-797f1ea8cd0b7f4f85df4cf069bcd64c37a8ed1d.zip |
Merge pull request #9349 from baude/v3unixts
V3unixts [3.0 Backports]
Diffstat (limited to 'test/e2e/ps_test.go')
-rw-r--r-- | test/e2e/ps_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index db3f7a36b..225bd538e 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -5,6 +5,7 @@ import ( "os" "regexp" "sort" + "strconv" "strings" . "github.com/containers/podman/v2/test/utils" @@ -210,6 +211,22 @@ var _ = Describe("Podman ps", func() { Expect(result.IsJSONOutputValid()).To(BeTrue()) }) + It("podman ps json format Created field is int64", func() { + session := podmanTest.RunTopContainer("test1") + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + result := podmanTest.Podman([]string{"ps", "--format", "json"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + + // Make sure Created field is an int64 + created, err := result.jq(".[0].Created") + Expect(err).To(BeNil()) + _, err = strconv.ParseInt(created, 10, 64) + Expect(err).To(BeNil()) + }) + It("podman ps print a human-readable `Status` with json format", func() { _, ec, _ := podmanTest.RunLsContainer("test1") Expect(ec).To(Equal(0)) |