summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-11 13:33:36 -0500
committerGitHub <noreply@github.com>2021-02-11 13:33:36 -0500
commita500d939754f0d63342ec379ae4490f86bb72150 (patch)
tree08a1d0014901c3233d5721c70de998d76538c03f /test
parentafe4ce6b1ce6a5ba21472f51defd243bdd7750b3 (diff)
parent5f999b6bcda79538cb1033503acd4c25615bd43b (diff)
downloadpodman-a500d939754f0d63342ec379ae4490f86bb72150.tar.gz
podman-a500d939754f0d63342ec379ae4490f86bb72150.tar.bz2
podman-a500d939754f0d63342ec379ae4490f86bb72150.zip
Merge pull request #9320 from baude/issue9315
container ps json format miscue
Diffstat (limited to 'test')
-rw-r--r--test/e2e/ps_test.go17
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))