]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephtool: add blacklist json output check 4746/head
authorJohn Spray <john.spray@redhat.com>
Fri, 22 May 2015 13:08:04 +0000 (14:08 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 26 May 2015 09:58:32 +0000 (10:58 +0100)
...not very elegantly because this is bash, but
at least check the expected value is somewhere
present in the JSON output.

Signed-off-by: John Spray <john.spray@redhat.com>
qa/workunits/cephtool/test.sh

index e3343bdcfc9ea9ac4162534b2a48d0157eaacffa..7e21363c18e8b2f588006fa1ba8bd0b4de7f6742 100755 (executable)
@@ -893,8 +893,13 @@ function test_mon_osd()
   # osd blacklist
   #
   bl=192.168.0.1:0/1000
+  # Escaped form which may appear in JSON output
+  bl_json=192.168.0.1:0\\\\/1000
   ceph osd blacklist add $bl
   ceph osd blacklist ls | grep $bl
+  ceph osd blacklist ls --format=json-pretty | grep $bl_json
+  ceph osd dump --format=json-pretty | grep $bl
+  ceph osd dump | grep "^blacklist $bl"
   ceph osd blacklist rm $bl
   expect_false "ceph osd blacklist ls | grep $bl"