From ee8f19e7be8626b17498a3c5602a7390a4d671e3 Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 10 Oct 2018 12:22:35 -0500 Subject: Make podman ps fast Like Ricky Bobby, we want to go fast. Signed-off-by: baude --- test/e2e/libpod_suite_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/e2e/libpod_suite_test.go') diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index a032b0e88..f34e9c5e7 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -315,8 +315,14 @@ func (s *PodmanSession) OutputToString() string { // OutputToStringArray returns the output as a []string // where each array item is a line split by newline func (s *PodmanSession) OutputToStringArray() []string { + var results []string output := fmt.Sprintf("%s", s.Out.Contents()) - return strings.Split(output, "\n") + for _, line := range strings.Split(output, "\n") { + if line != "" { + results = append(results, line) + } + } + return results } // ErrorGrepString takes session stderr output and behaves like grep. it returns a bool -- cgit v1.2.3-54-g00ecf