]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephtool: test bounds on pool's `hit_set_*`
authorJoao Eduardo Luis <joao@suse.de>
Wed, 31 Oct 2018 11:44:54 +0000 (11:44 +0000)
committerJoao Eduardo Luis <joao@suse.de>
Wed, 31 Oct 2018 16:05:40 +0000 (16:05 +0000)
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
qa/workunits/cephtool/test.sh

index 2739c02f0544172e0ba6f43afcc3b5e0ae7ec5c8..a75f98740ca549ca41b88623cbdaf636b3cdd045 100755 (executable)
@@ -2093,6 +2093,14 @@ function test_mon_osd_tiered_pool_set()
   ceph osd pool create real-tier 2
   ceph osd tier add rbd real-tier
 
+  # expect us to be unable to set negative values for hit_set_*
+  for o in hit_set_period hit_set_count hit_set_fpp; do
+    expect_false ceph osd pool set real_tier $o -1
+  done
+
+  # and hit_set_fpp should be in range 0..1
+  expect_false ceph osd pool set real_tier hit_set_fpp 2
+
   ceph osd pool set real-tier hit_set_type explicit_hash
   ceph osd pool get real-tier hit_set_type | grep "hit_set_type: explicit_hash"
   ceph osd pool set real-tier hit_set_type explicit_object