Fix Migrator test and also add the test to build script (#896)

* Fix MigratorTest after update to Kotlin 2.0.0

* add main module's test to build script
This commit is contained in:
Tran M. Cuong 2024-06-23 05:05:44 +07:00 committed by GitHub
parent 0ce1cf22cd
commit e57638a49c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -38,4 +38,4 @@ jobs:
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2 uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
- name: Build app and run unit tests - name: Build app and run unit tests
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest

View file

@ -36,7 +36,7 @@ jobs:
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2 uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
- name: Build app and run unit tests - name: Build app and run unit tests
run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest run: ./gradlew detekt assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest
# Sign APK and create release for tags # Sign APK and create release for tags

View file

@ -29,7 +29,7 @@ class MigratorTest {
fun initilize() { fun initilize() {
migrationContext = MigrationContext(false) migrationContext = MigrationContext(false)
migrationJobFactory = spyk(MigrationJobFactory(migrationContext, CoroutineScope(Dispatchers.Main + Job()))) migrationJobFactory = spyk(MigrationJobFactory(migrationContext, CoroutineScope(Dispatchers.Main + Job())))
migrationCompletedListener = spyk<() -> Unit>({}) migrationCompletedListener = spyk<MigrationCompletedListener>(block = {})
migrationStrategyFactory = spyk(MigrationStrategyFactory(migrationJobFactory, migrationCompletedListener)) migrationStrategyFactory = spyk(MigrationStrategyFactory(migrationJobFactory, migrationCompletedListener))
} }