From 321faa9c6bb151dfc56f16499581a49a1b18c82f Mon Sep 17 00:00:00 2001 From: Neha Ojha Date: Thu, 9 Apr 2020 01:06:57 +0000 Subject: [PATCH] qa/standalone/mon/osd-pool-df.sh: fix test to check for the right values Though the test passed, we weren't checking for the correct values: .../qa/standalone/mon/osd-pool-df.sh:62: TEST_ceph_df: ceph df -f json .../qa/standalone/mon/osd-pool-df.sh:62: TEST_ceph_df: jq .stats.total_avail_bytes ../qa/standalone/mon/osd-pool-df.sh:62: TEST_ceph_df: local global_avail=0 .../qa/standalone/mon/osd-pool-df.sh:63: TEST_ceph_df: ceph df -f json .../qa/standalone/mon/osd-pool-df.sh:63: TEST_ceph_df: jq '.pools | map(select(.name == "$rep_poolname"))[0].stats.max_avail' ../qa/standalone/mon/osd-pool-df.sh:63: TEST_ceph_df: local rep_avail=null .../qa/standalone/mon/osd-pool-df.sh:64: TEST_ceph_df: ceph df -f json .../qa/standalone/mon/osd-pool-df.sh:64: TEST_ceph_df: jq '.pools | map(select(.name == "$ec_poolname"))[0].stats.max_avail' ../qa/standalone/mon/osd-pool-df.sh:64: TEST_ceph_df: local ec_avail=null ../qa/standalone/mon/osd-pool-df.sh:66: TEST_ceph_df: echo '0 >= null*3' ../qa/standalone/mon/osd-pool-df.sh:66: TEST_ceph_df: bc 1 ../qa/standalone/mon/osd-pool-df.sh:67: TEST_ceph_df: echo '0 >= null*1.5' ../qa/standalone/mon/osd-pool-df.sh:67: TEST_ceph_df: bc 1 Signed-off-by: Neha Ojha --- qa/standalone/mon/osd-pool-df.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/standalone/mon/osd-pool-df.sh b/qa/standalone/mon/osd-pool-df.sh index 3ed169d8c04..49cc66f1c92 100755 --- a/qa/standalone/mon/osd-pool-df.sh +++ b/qa/standalone/mon/osd-pool-df.sh @@ -58,10 +58,11 @@ function TEST_ceph_df() { local ec_poolname=testcephdf_erasurecode create_pool $rep_poolname 6 6 replicated create_pool $ec_poolname 6 6 erasure ec42profile + sleep 2 local global_avail=`ceph df -f json | jq '.stats.total_avail_bytes'` - local rep_avail=`ceph df -f json | jq '.pools | map(select(.name == "$rep_poolname"))[0].stats.max_avail'` - local ec_avail=`ceph df -f json | jq '.pools | map(select(.name == "$ec_poolname"))[0].stats.max_avail'` + local rep_avail=`ceph df -f json | jq '.pools | map(select(.name == "'$rep_poolname'"))[0].stats.max_avail'` + local ec_avail=`ceph df -f json | jq '.pools | map(select(.name == "'$ec_poolname'"))[0].stats.max_avail'` echo "${global_avail} >= ${rep_avail}*3" | bc || return 1 echo "${global_avail} >= ${ec_avail}*1.5" | bc || return 1 -- 2.39.5