Skip to main content

ingest_store_conformance

Macro ingest_store_conformance 

Source
macro_rules! ingest_store_conformance {
    (mod_name = $mod_name:ident, emit = $emit:path, fixture = $fixture:expr) => { ... };
    (mod_name = $mod_name:ident, fixture = $fixture:expr) => { ... };
    ($fixture:expr) => { ... };
}
Expand description

Generates the ingest conformance suite for a store adapter.

Takes an expression that produces an IngestFixture. The rule list is not written here; it comes from for_each_ingest_store_rule!, which is the only place it is written at all.

ยงExamples

The default harness, #[tokio::test]:

happenstance_sync_testkit::ingest_store_conformance!(
    happenstance_sync_testkit::MemoryIngestFixture::new()
);

A different harness, and a module name of your own:

happenstance_sync_testkit::ingest_store_conformance!(
    mod_name = blocking_ingest_conformance,
    emit = happenstance_sync_testkit::emit_ingest_blocking,
    fixture = super::MyFixture::new()
);