Update tests to use new db schema and migrations

This commit is contained in:
Tobias_Groza
2024-08-09 13:41:53 +02:00
parent 1e7324ca3b
commit 14ffc7023b
3 changed files with 5 additions and 5 deletions

View File

@@ -232,7 +232,7 @@ internal class MultiRepoMigrationTest {
// now get the Room DB, so we can use our DAOs for verifying the migration
databaseBuilder(getApplicationContext(), FDroidDatabaseInt::class.java, TEST_DB)
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_2_3, MIGRATION_5_6)
.allowMainThreadQueries()
.build()
.use { db ->
@@ -275,7 +275,7 @@ internal class MultiRepoMigrationTest {
// now get the Room DB, so we can use our DAOs for verifying the migration
databaseBuilder(getApplicationContext(), FDroidDatabaseInt::class.java, TEST_DB)
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_2_3, MIGRATION_5_6)
.allowMainThreadQueries()
.build().use { db ->
// repo without cert did not get migrated, because we auto-migrate to latest version
@@ -311,7 +311,7 @@ internal class MultiRepoMigrationTest {
// now get the Room DB, so we can use our DAOs for verifying the migration
databaseBuilder(getApplicationContext(), FDroidDatabaseInt::class.java, TEST_DB)
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_2_3, MIGRATION_5_6)
.allowMainThreadQueries()
.build().use { db ->
check(db)

View File

@@ -74,7 +74,7 @@ internal class RepoCertNonNullMigrationTest {
// now get the Room DB, so we can use our DAOs for verifying the migration
Room.databaseBuilder(getApplicationContext(), FDroidDatabaseInt::class.java, TEST_DB)
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_2_3, MIGRATION_5_6)
.allowMainThreadQueries()
.build().use { db ->
// repo without cert did not get migrated, the other one did