Update tests to use new db schema and migrations

This commit is contained in:
Tobias_Groza committed 2024-09-03 19:06:10 +02:00
1 parent 1e7324ca3b
commit 14ffc7023b
3 files changed
+5 -5

No files matched your search

@@ -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)
@@ -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