mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-20 23:07:26 -04:00
Update tests to use new db schema and migrations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user