]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs
authorDavid Zafman <dzafman@redhat.com>
Sat, 15 Nov 2014 19:46:15 +0000 (11:46 -0800)
committerLoic Dachary <ldachary@redhat.com>
Sat, 15 Nov 2014 22:29:10 +0000 (23:29 +0100)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/test/ceph_objectstore_tool.py

index 4dbca79244a9a491ed3b6bb3ab729c904468c7f7..62caee4db5a4be1d308baf88dafa3b33a17bfbb1 100755 (executable)
@@ -469,6 +469,9 @@ def main(argv):
     for JSON in JSONOBJ:
         jsondict = json.loads(JSON)
         db[jsondict['namespace']][jsondict['oid']]['json'] = JSON
+        if string.find(jsondict['oid'], EC_NAME) == 0 and 'shard_id' not in jsondict:
+            logging.error("Malformed JSON {json}".format(json=JSON))
+            ERRORS += 1
 
     # Test get-bytes
     print "Test get-bytes and set-bytes"