diff options
author | Matthew Heon <mheon@redhat.com> | 2018-07-13 15:14:51 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2018-07-13 15:14:51 -0400 |
commit | 2bdefc6c1e8795d8102bb320f3a5d7ac679cfd57 (patch) | |
tree | f3cf91dcbd396cf9b34cd67cbf32abcf245df623 /test/e2e/ps_test.go | |
parent | 5b43a6a7ee6638b6d6cdb129321e42ce0dce6975 (diff) | |
download | podman-2bdefc6c1e8795d8102bb320f3a5d7ac679cfd57.tar.gz podman-2bdefc6c1e8795d8102bb320f3a5d7ac679cfd57.tar.bz2 podman-2bdefc6c1e8795d8102bb320f3a5d7ac679cfd57.zip |
Fix ps --sort=size test
I don't know how the previous test was succeeding, as we never
actually fetched the sizes to sort with. The test now does.
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'test/e2e/ps_test.go')
-rw-r--r-- | test/e2e/ps_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index 38b59e1d1..b3d58af77 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -201,12 +201,15 @@ var _ = Describe("Podman ps", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - session = podmanTest.Podman([]string{"ps", "-a", "--sort=size", "--format", "{{.Size}}"}) + session = podmanTest.Podman([]string{"ps", "-a", "-s", "--sort=size", "--format", "{{.Size}}"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) sortedArr := session.OutputToStringArray() + // TODO: This may be broken - the test was running without the + // ability to perform any sorting for months and succeeded + // without error. Expect(sort.SliceIsSorted(sortedArr, func(i, j int) bool { r := regexp.MustCompile(`^\S+\s+\(virtual (\S+)\)`) matches1 := r.FindStringSubmatch(sortedArr[i]) |