aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-02-06 15:55:14 -0500
committerQi Wang <qiwan@redhat.com>2020-02-10 10:34:40 -0500
commit3afd1b5a7c40e2a55ffd93b9a987385daa3047c0 (patch)
treeb03e7c67fc12f4fb3690ecc855552c6af00f9e6a /test
parente57253d06841d7a128ef760f8c47acf4b59157df (diff)
downloadpodman-3afd1b5a7c40e2a55ffd93b9a987385daa3047c0.tar.gz
podman-3afd1b5a7c40e2a55ffd93b9a987385daa3047c0.tar.bz2
podman-3afd1b5a7c40e2a55ffd93b9a987385daa3047c0.zip
images --format compatible with docker
This patch lets valid values of --format be compatible with docker. Replace CreatedTime with CreatedAt, Created with CreatedSince. Keep CreatedTime and Created are valid as hidden options. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/images_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 9a67cc83a..8b6b679a5 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -116,7 +116,8 @@ var _ = Describe("Podman images", func() {
})
It("podman images in GO template format", func() {
- session := podmanTest.Podman([]string{"images", "--format={{.ID}}"})
+ formatStr := "{{.ID}}\t{{.Created}}\t{{.CreatedAt}}\t{{.CreatedSince}}\t{{.CreatedTime}}"
+ session := podmanTest.Podman([]string{"images", fmt.Sprintf("--format=%s", formatStr)})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
@@ -280,7 +281,7 @@ RUN apk update && apk add man
return session.OutputToStringArray()
}
- sortedArr := sortValueTest("created", 0, "CreatedTime")
+ sortedArr := sortValueTest("created", 0, "CreatedAt")
Expect(sort.SliceIsSorted(sortedArr, func(i, j int) bool { return sortedArr[i] > sortedArr[j] })).To(BeTrue())
sortedArr = sortValueTest("id", 0, "ID")