macro_rules! media_store_inner_integration_tests {
(with_media_size_tests) => { ... };
() => { ... };
(@inner) => { ... };
}Available on crate features
testing only.Expand description
Macro building to allow your MediaStoreInner implementation to run the
entire tests suite locally.
Can be run with the with_media_size_tests argument to include more tests
about the media cache retention policy based on content size. It is not
recommended to run those in encrypted stores because the size of the
encrypted content may vary compared to what the tests expect.
You need to provide an
async fn get_media_store() -> media::store::Result<Store> that provides a
fresh media store that implements MediaStoreInner on the same level you
invoke the macro.
ยงUsage example
#[cfg(test)]
mod tests {
use super::{MediaStoreResult, MyStore};
async fn get_media_store() -> MediaStoreResult<MyStore> {
Ok(MyStore::new())
}
media_store_inner_integration_tests!();
}