summaryrefslogtreecommitdiff
path: root/test/e2e/images_test.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-02-05 10:15:36 -0500
committerumohnani8 <umohnani@redhat.com>2018-02-07 10:43:16 -0500
commit363cfcb0ce1477249a40861ef936f377b95aaf09 (patch)
treefde73614f43b40592b46a65920ce02d22d5fb4ce /test/e2e/images_test.go
parent3f0170227d40b154205eb9f787e6f0254d75749e (diff)
downloadpodman-363cfcb0ce1477249a40861ef936f377b95aaf09.tar.gz
podman-363cfcb0ce1477249a40861ef936f377b95aaf09.tar.bz2
podman-363cfcb0ce1477249a40861ef936f377b95aaf09.zip
Fix when the --format flag prints a new line at the end
If the output is to a terminal, return a new line at the end of the output so that the output is visually appealing. If the output is being piped, or saved to a file, basically not being outputted to a terminal, do not print a new line at the end of the output. This ensures any further data manipulation with the results happens smoothly without requiring to remember the '/n' at the end of the output. Signed-off-by: umohnani8 <umohnani@redhat.com>
Diffstat (limited to 'test/e2e/images_test.go')
-rw-r--r--test/e2e/images_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 099331c94..4c7c93e4b 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -32,7 +32,7 @@ var _ = Describe("Podman images", func() {
session := podmanTest.Podman([]string{"images"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 3))
+ Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2))
Expect(session.LineInOuputStartsWith("docker.io/library/alpine")).To(BeTrue())
Expect(session.LineInOuputStartsWith("docker.io/library/busybox")).To(BeTrue())
})
@@ -48,6 +48,6 @@ var _ = Describe("Podman images", func() {
session := podmanTest.Podman([]string{"images", "-qn"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2))
+ Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 1))
})
})