multi: pass in a MigrationConfig to all optional migrations

Define a MigrationConfig interface that should be used to pass the
config of an optional migration function. An implementation of this
interface is added for migration30 (the only current optional
migration).
This commit is contained in:
Elle Mouton committed 2023-02-16 20:45:08 +02:00
1 parent 33b7b9221a
commit 70e3f8f511
5 files changed
+45 -9

No files matched your search

+2 -1
View File
@@ -89,7 +89,8 @@ func ApplyMigration(t *testing.T,
// function. This function differs from ApplyMigration as it requires the
// supplied migration functions to take a db instance and construct their own
// database transactions.
func ApplyMigrationWithDB(t testing.TB, beforeMigration, afterMigration,
func ApplyMigrationWithDB(t testing.TB, beforeMigration,
afterMigration func(db kvdb.Backend) error,
migrationFunc func(db kvdb.Backend) error, shouldFail bool) {
t.Helper()