fedimint_testing_core::db

Function create_snapshot

Source
async fn create_snapshot<'a, F>(
    snapshot_dir: PathBuf,
    decoders: ModuleDecoderRegistry,
    is_isolated: bool,
    prepare_fn: F,
) -> Result<()>
where F: FnOnce(Database) -> BoxFuture<'a, ()>,
Expand description

Creates a backup database in the snapshot_dir according to the FM_PREPARE_DB_MIGRATION_SNAPSHOTS, since we do not want to re-create a backup database every time we run the tests.