Liking cljdoc? Tell your friends :D

blocks.store.tests

Suite of tests to verify that a given block store implementation conforms to the spec.

Suite of tests to verify that a given block store implementation conforms to
the spec.
raw docstring

check-storeclj

(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.
sourceraw docstring

check-store*clj

(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, :batch, :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`, `:batch`, `: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.
sourceraw docstring

gen->DeleteBlockclj

(gen->DeleteBlock blocks)

Constructs a DeleteBlock operation generator.

Constructs a DeleteBlock operation generator.
sourceraw docstring

gen->DeleteBlockBatchclj

(gen->DeleteBlockBatch blocks)

Constructs a DeleteBlockBatch operation generator.

Constructs a DeleteBlockBatch operation generator.
sourceraw docstring

gen->EraseStoreclj

(gen->EraseStore context)

Constructs a EraseStore operation generator.

Constructs a EraseStore operation generator.
sourceraw docstring

gen->GetBlockclj

(gen->GetBlock blocks)

Constructs a GetBlock operation generator.

Constructs a GetBlock operation generator.
sourceraw docstring

gen->GetBlockBatchclj

(gen->GetBlockBatch blocks)

Constructs a GetBlockBatch operation generator.

Constructs a GetBlockBatch operation generator.
sourceraw docstring

gen->ListBlocksclj

(gen->ListBlocks blocks)

Constructs a ListBlocks operation generator.

Constructs a ListBlocks operation generator.
sourceraw docstring

gen->OpenBlockclj

(gen->OpenBlock blocks)

Constructs a OpenBlock operation generator.

Constructs a OpenBlock operation generator.
sourceraw docstring

gen->OpenBlockRangeclj

(gen->OpenBlockRange blocks)

Constructs a OpenBlockRange operation generator.

Constructs a OpenBlockRange operation generator.
sourceraw docstring

gen->PutBlockclj

(gen->PutBlock blocks)

Constructs a PutBlock operation generator.

Constructs a PutBlock operation generator.
sourceraw docstring

gen->PutBlockBatchclj

(gen->PutBlockBatch blocks)

Constructs a PutBlockBatch operation generator.

Constructs a PutBlockBatch operation generator.
sourceraw docstring

gen->ScanStoreclj

(gen->ScanStore blocks)

Constructs a ScanStore operation generator.

Constructs a ScanStore operation generator.
sourceraw docstring

gen->StatBlockclj

(gen->StatBlock ctx)

Constructs a StatBlock operation generator.

Constructs a StatBlock operation generator.
sourceraw docstring

generate-blocks!clj

(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.
sourceraw docstring

populate-blocks!clj

(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.
sourceraw docstring

random-blockclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close