Function fedimint_testing::db::prepare_db_migration_snapshot
source · pub async fn prepare_db_migration_snapshot<F>(
snapshot_name: &str,
prepare_fn: F,
decoders: ModuleDecoderRegistry
) -> Result<()>
Expand description
Creates the database backup directory by appending the snapshot_name
to db/migrations
. Then this function will execute the provided
prepare_fn
which is expected to populate the database with the appropriate
data for testing a migration. If the snapshot directory already exists,
this function will do nothing.