fedimint_testing_core::db

Function validate_migrations_global

Source
pub async fn validate_migrations_global<F, Fut>(
    validate: F,
    db_prefix: &str,
    migrations: BTreeMap<DatabaseVersion, CoreMigrationFn>,
    decoders: ModuleDecoderRegistry,
) -> Result<()>
where F: Fn(Database) -> Fut, Fut: Future<Output = Result<()>>,
Expand description

Validates the database migrations. decoders need to be passed in as an argument since this is module agnostic. First applies all defined migrations to the database then executes the `validate`` function which should confirm the database migrations were successful.