test: Be smarter about when jsonschema can be used

Signed-off-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
David Zafman 2018-04-09 15:09:38 -07:00
parent 60ae2b8eb3
commit 9c5ef19f93
2 changed files with 6 additions and 6 deletions

View File

@ -1326,7 +1326,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
@ -2456,7 +2456,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
@ -3196,7 +3196,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
@ -4616,7 +4616,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
@ -4976,7 +4976,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

View File

@ -632,7 +632,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