]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Be smarter about when jsonschema can be used
authorDavid Zafman <dzafman@redhat.com>
Mon, 9 Apr 2018 22:09:38 +0000 (15:09 -0700)
committerDavid Zafman <dzafman@redhat.com>
Wed, 11 Apr 2018 16:36:03 +0000 (09:36 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 9c5ef19f93d999c50641b8bf464b462e0ef5e8f2)

qa/standalone/scrub/osd-scrub-repair.sh
qa/standalone/scrub/osd-scrub-snaps.sh

index f295284e01832a9c0e001f31b65ca9a09b080b0d..7ef39c6395883d46289221bbf89057ef758fe5ac 100755 (executable)
@@ -1324,7 +1324,7 @@ EOF
         jq '.' $dir/json > save1.json
     fi
 
-    if which jsonschema > /dev/null;
+    if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null;
     then
       jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1
     fi
@@ -2506,7 +2506,7 @@ EOF
         jq '.' $dir/json > save2.json
     fi
 
-    if which jsonschema > /dev/null;
+    if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null;
     then
       jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1
     fi
@@ -3246,7 +3246,7 @@ EOF
         jq '.' $dir/json > save3.json
     fi
 
-    if which jsonschema > /dev/null;
+    if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null;
     then
       jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1
     fi
@@ -4666,7 +4666,7 @@ EOF
       jq '.' $dir/json > save${num}.json
     fi
 
-    if which jsonschema > /dev/null;
+    if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null;
     then
       jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1
     fi
@@ -5026,7 +5026,7 @@ EOF
         jq '.' $dir/json > save6.json
     fi
 
-    if which jsonschema > /dev/null;
+    if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null;
     then
       jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1
     fi
index c701110f27b311e1b925c19618923069b5588537..f0e4aee7e589febdec56b0f642115a35c164341a 100755 (executable)
@@ -642,7 +642,7 @@ EOF
         jq '.' $dir/json > save1.json
     fi
 
-    if which jsonschema > /dev/null;
+    if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null;
     then
       jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-snap.json || return 1
     fi