]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: check range blocklist in cephtool/test.sh
authorGreg Farnum <gfarnum@redhat.com>
Wed, 1 Dec 2021 16:18:50 +0000 (16:18 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Tue, 31 May 2022 23:32:58 +0000 (23:32 +0000)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 1ca89ca76dbbae355831dc81065f22e6eb7e37ca)

qa/workunits/cephtool/test.sh

index d27883eabd29cefb48fc8969cee81abd7d376ce7..9ae249f9c794588dc28b857d985af5ba65fa55be 100755 (executable)
@@ -1429,6 +1429,15 @@ function test_mon_osd()
   # test with invalid address
   expect_false "ceph osd blocklist add 1234.56.78.90/100"
 
+  # test range blocklisting
+  bl=192.168.0.1/24
+  ceph osd blocklist range add $bl
+  ceph osd blocklist ls | grep $bl
+  ceph osd blocklist range rm $bl
+  ceph osd blocklist ls | expect_false grep $bl
+  bad_bl=192.168.0.1/33
+  expect_false ceph osd blocklist range add $bad_bl
+
   # Test `clear`
   ceph osd blocklist add $bl
   ceph osd blocklist ls | grep $bl