macro_rules! cryptostore_integration_tests {
() => { ... };
}
Available on crate feature
testing
only.Expand description
A macro which will run the CryptoStore integration test suite.
You need to provide a async fn get_store() -> StoreResult<impl StateStore>
providing a fresh store on the same level you invoke the macro.
ยงUsage Example:
#[cfg(test)]
mod tests {
use super::MyCryptoStore;
async fn get_store(
name: &str,
passphrase: Option<&str>,
clear_data: bool,
) -> MyCryptoStore {
let store = MyCryptoStore::new();
if clear_data {
store.clear();
}
store
}
cryptostore_integration_tests!();
}