Suite of generative behavioral tests to verify that a given block store implementation conforms to the spec.
Suite of generative behavioral tests to verify that a given block store implementation conforms to the spec.
(check-store constructor)
Uses generative tests to validate the behavior of a block store implementation. The first argument must be a no-arg constructor function which will produce a new block store for testing.
See check-store*
for a variant with more configurable options.
Uses generative tests to validate the behavior of a block store implementation. The first argument must be a no-arg constructor function which will produce a new block store for testing. See `check-store*` for a variant with more configurable options.
(check-store*
constructor
{:keys [blocks max-size operations concurrency iterations repetitions]
:or {blocks 20
max-size 1024
operations [:basic]
concurrency 4
iterations (or (some-> (System/getenv "BLOCKS_STORE_TEST_ITERATIONS")
(Integer/parseInt))
100)
repetitions (or (some-> (System/getenv "BLOCKS_STORE_TEST_REPETITIONS")
(Integer/parseInt))
10)}})
Uses generative tests to validate the behavior of a block store implementation. The first argument must be a no-arg constructor function which will produce a new block store for testing. The remaining options control the behavior of the tests:
blocks
Generate this many random blocks to test the store with.max-size
Maximum block size to generate, in bytes.operations
Kinds of operations to test - vector of :basic
, :erase
.concurrency
Maximum number of threads of operations to generate.iterations
Number of generative tests to perform.repetitions
Number of times to repeat the test for concurrency checks.Returns the results of the generative tests.
Uses generative tests to validate the behavior of a block store implementation. The first argument must be a no-arg constructor function which will produce a new block store for testing. The remaining options control the behavior of the tests: - `blocks` Generate this many random blocks to test the store with. - `max-size` Maximum block size to generate, in bytes. - `operations` Kinds of operations to test - vector of `:basic`, `:erase`. - `concurrency` Maximum number of threads of operations to generate. - `iterations` Number of generative tests to perform. - `repetitions` Number of times to repeat the test for concurrency checks. Returns the results of the generative tests.
(gen->DeleteBlock blocks)
Constructs a DeleteBlock operation generator.
Constructs a DeleteBlock operation generator.
(gen->EraseStore context)
Constructs a EraseStore operation generator.
Constructs a EraseStore operation generator.
(gen->GetBlock blocks)
Constructs a GetBlock operation generator.
Constructs a GetBlock operation generator.
(gen->ListBlocks blocks)
Constructs a ListBlocks operation generator.
Constructs a ListBlocks operation generator.
(gen->OpenBlock blocks)
Constructs a OpenBlock operation generator.
Constructs a OpenBlock operation generator.
(gen->OpenBlockRange blocks)
Constructs a OpenBlockRange operation generator.
Constructs a OpenBlockRange operation generator.
(gen->PutBlock blocks)
Constructs a PutBlock operation generator.
Constructs a PutBlock operation generator.
(gen->ScanStore blocks)
Constructs a ScanStore operation generator.
Constructs a ScanStore operation generator.
(gen->StatBlock ctx)
Constructs a StatBlock operation generator.
Constructs a StatBlock operation generator.
(generate-blocks! n max-size)
Generates some test blocks and returns a map of the ids to the blocks.
Generates some test blocks and returns a map of the ids to the blocks.
(populate-blocks! store & {:keys [n max-size] :or {n 10 max-size 1024}})
Generates random blocks and puts them into the given store. Returns a map of multihash ids to blocks.
Generates random blocks and puts them into the given store. Returns a map of multihash ids to blocks.
(random-block max-size)
Creates a new block with random content at most max-size
bytes long.
Creates a new block with random content at most `max-size` bytes long.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close