merkle-db.tools.validate

Validation framework for testing database MerkleDAG structures.

*context*

dynamic

Dynamically-bound validation context.

check

macro

(check type-key test-form message)(check type-key test-form message bad-state)

check-asserts

macro

(check-asserts results)

check-next!

(check-next! check-fn link params)

Register a validation function to run against the linked node.

collect-results

macro

(collect-results & body)

report!

(report! type-key state message expected actual)

Record a validation result. The function accepts a multihash node id, a keyword validation type, a result key (:pass, :warn, :fail, or :error) and a message string.

run!

(run! store root-id root-check params)

Validate a full graph structure by walking the nodes and links with validation functions. Returns a map from node ids to information maps, which contain a :paths set and a :results vector with assertion result maps.

validate-data-tree

(validate-data-tree root params)

validate-index

(validate-index index params)

validate-partition

(validate-partition part params)

validate-tablet

(validate-tablet tablet params)