summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-01-27 10:42:22 +0100
committerMatthew Heon <matthew.heon@pm.me>2021-01-29 15:23:10 -0500
commitb4aa54c7561f7093f795093a72c75248018f3517 (patch)
tree7f72f8782547aa9aaadc741d9a8ab06f11a20204 /test/e2e
parentbb88db783c1756291e8047a1a7ffd214477f7f9b (diff)
downloadpodman-b4aa54c7561f7093f795093a72c75248018f3517.tar.gz
podman-b4aa54c7561f7093f795093a72c75248018f3517.tar.bz2
podman-b4aa54c7561f7093f795093a72c75248018f3517.zip
Fix podman history --no-trunc for the CREATED BY field
Fixes #9120 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/history_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/history_test.go b/test/e2e/history_test.go
index fea3f4d43..1c57c60de 100644
--- a/test/e2e/history_test.go
+++ b/test/e2e/history_test.go
@@ -65,6 +65,23 @@ var _ = Describe("Podman history", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 0))
+
+ session = podmanTest.Podman([]string{"history", "--no-trunc", "--format", "{{.ID}}", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ lines := session.OutputToStringArray()
+ Expect(len(lines)).To(BeNumerically(">", 0))
+ // the image id must be 64 chars long
+ Expect(len(lines[0])).To(BeNumerically("==", 64))
+
+ session = podmanTest.Podman([]string{"history", "--no-trunc", "--format", "{{.CreatedBy}}", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ lines = session.OutputToStringArray()
+ Expect(len(lines)).To(BeNumerically(">", 0))
+ Expect(session.OutputToString()).ToNot(ContainSubstring("..."))
+ // the second line in the alpine history contains a command longer than 45 chars
+ Expect(len(lines[1])).To(BeNumerically(">", 45))
})
It("podman history with json flag", func() {