]> 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>
Wed, 13 Apr 2022 00:14:16 +0000 (00:14 +0000)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
qa/workunits/cephtool/test.sh

index 73e0836fc744f1ca4b3d6613f1b4f3b5f42beec9..b73cd91d7f547dfea7c779e25b9fdb1dcb6c0d21 100755 (executable)
@@ -1432,6 +1432,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