Skip to main content

Module testkit

Module testkit 

Source
Expand description

Test facilities for embedders, and for this crate’s own assurance layers.

Shipped rather than confined to tests/ because an embedder’s own store implementation and own skills need the same treatment this crate’s do, and rebuilding a fault injector per project is how each one ends up testing a slightly different, slightly weaker thing.

Behind the testkit feature, off by default: nothing here should be reachable from a production build.

Re-exports§

pub use memory_keyring::MemoryKeyRing;
pub use backstop::assert_replay_was_not_backstopped;
pub use conformance::Report;
pub use conformance::Violation;
pub use conformance::check as check_journal_store;
pub use faults::Fault;
pub use faults::Faulty;
pub use faults::Schedule;

Modules§

backstop
The assertion that a defence-in-depth property is actually being tested.
conformance
What every journal store must do, checked against any implementation.
conformance_case
What the case-layer stores must do, checked against any implementation.
conformance_keyring
One contract, run against every key ring.
conformance_quota
One contract, run against every quota store.
faults
A store that fails on purpose, deterministically.
memory_keyring
A key ring in this process. For tests, and unreachable without testkit.

Structs§

Ask
What the fake was asked.
FakeProvider
A ModelProvider that answers without a model.
SharedJournal
A journal that claims to be shared, over one that is not.
StagedAtomic
A journal store that lends a (simulated) transaction.
StubSigner
Produces a deterministic, forgeable “signature”.

Type Aliases§

Statement
One statement a resource ran.