diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-23 09:05:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 09:05:20 -0700 |
commit | 41a4827f841bf97c4c22ce651058741dc15e9451 (patch) | |
tree | 7b2cc7ef01115c8f45227c38e1b24a1d266260a5 /test/e2e/libpod_suite_test.go | |
parent | 02a76a82b6860739ecd656b20817bbd2bd2c47ee (diff) | |
parent | ee8f19e7be8626b17498a3c5602a7390a4d671e3 (diff) | |
download | podman-41a4827f841bf97c4c22ce651058741dc15e9451.tar.gz podman-41a4827f841bf97c4c22ce651058741dc15e9451.tar.bz2 podman-41a4827f841bf97c4c22ce651058741dc15e9451.zip |
Merge pull request #1638 from baude/fastps
Make podman ps fast
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r-- | test/e2e/libpod_suite_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index d521632d7..56a603f3e 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -311,8 +311,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 |