From: David Zafman Date: Fri, 20 Dec 2019 21:46:34 +0000 (-0800) Subject: test: Sort pool list because the order isn't guaranteed from "balancer pool ls" X-Git-Tag: v14.2.8~20^2~18^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31956%2Fhead;p=ceph.git test: Sort pool list because the order isn't guaranteed from "balancer pool ls" Signed-off-by: David Zafman (cherry picked from commit c65d5c8d1421438da999698f1f734d6a61adb3bb) --- diff --git a/qa/standalone/mgr/balancer.sh b/qa/standalone/mgr/balancer.sh index 984b6504ba0..7e87cbf4a5f 100755 --- a/qa/standalone/mgr/balancer.sh +++ b/qa/standalone/mgr/balancer.sh @@ -67,9 +67,9 @@ function TEST_balancer() { ceph balancer pool add $TEST_POOL1 || return 1 ceph balancer pool add $TEST_POOL2 || return 1 ceph balancer pool ls || return 1 - eval POOL=$(ceph balancer pool ls | jq '.[0]') + eval POOL=$(ceph balancer pool ls | jq 'sort | .[0]') test "$POOL" = "$TEST_POOL1" || return 1 - eval POOL=$(ceph balancer pool ls | jq '.[1]') + eval POOL=$(ceph balancer pool ls | jq 'sort | .[1]') test "$POOL" = "$TEST_POOL2" || return 1 ceph balancer pool rm $TEST_POOL1 || return 1 ceph balancer pool rm $TEST_POOL2 || return 1