Skip to content

Commit a153739

Browse files
committed
deps: Update kotest to version 6.0.1
Note that the module `kotest-framework-api` does not exist anymore, see [1], and the the module `kotest-framework-datatest` has been merged into `kotest-framework-engine`. But some functions of `kotest-framework-datatest` have been moved to `kotest-assertions-table`. [1]: kotest/kotest#4562 Signed-off-by: Frank Viernau <[email protected]>
1 parent 0520bd9 commit a153739

File tree

20 files changed

+27
-28
lines changed

20 files changed

+27
-28
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jruby = "9.4.13.0"
3737
jslt = "0.1.14"
3838
jsonSchemaValidator = "1.5.8"
3939
kaml = "0.93.0"
40-
kotest = "5.9.1"
40+
kotest = "6.0.1"
4141
kotlinPoet = "2.2.0"
4242
kotlinxCoroutines = "1.10.2"
4343
kotlinxHtml = "0.12.0"
@@ -131,8 +131,8 @@ jslt = { module = "com.schibsted.spt.data:jslt", version.ref = "jslt" }
131131
jsonSchemaValidator = { module = "com.networknt:json-schema-validator", version.ref = "jsonSchemaValidator" }
132132
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
133133
kotest-assertions-json = { module = "io.kotest:kotest-assertions-json", version.ref = "kotest" }
134+
kotest-assertions-table = { module = "io.kotest:kotest-assertions-table", version.ref = "kotest" }
134135
kotest-extensions-junitXml = { module = "io.kotest:kotest-extensions-junitxml", version.ref = "kotest" }
135-
kotest-framework-api = { module = "io.kotest:kotest-framework-api", version.ref = "kotest" }
136136
kotest-framework-datatest = { module = "io.kotest:kotest-framework-datatest", version.ref = "kotest" }
137137
kotest-framework-engine = { module = "io.kotest:kotest-framework-engine", version.ref = "kotest" }
138138
kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }

model/src/funTest/kotlin/utils/PostgresProvenanceFileStorageFunTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class PostgresProvenanceFileStorageFunTest : WordSpec({
4949
val postgresListener = PostgresListener()
5050
lateinit var storage: PostgresProvenanceFileStorage
5151

52-
register(postgresListener)
52+
extension(postgresListener)
5353

5454
beforeEach {
5555
storage = PostgresProvenanceFileStorage(postgresListener.dataSource, FileArchiverConfiguration.TABLE_NAME)

model/src/test/kotlin/CompatibilityDependencyNavigatorTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.ossreviewtoolkit.model
2121

22-
import io.kotest.assertions.fail
22+
import io.kotest.assertions.AssertionErrorBuilder
2323
import io.kotest.core.spec.style.WordSpec
2424
import io.kotest.matchers.sequences.shouldContainExactly
2525
import io.kotest.matchers.shouldBe
@@ -65,7 +65,7 @@ class CompatibilityDependencyNavigatorTest : WordSpec() {
6565
navigator.graphNavigator shouldBe instanceOf<DependencyGraphNavigator>()
6666
}
6767

68-
else -> fail("Unexpected dependency navigator: $navigator.")
68+
else -> AssertionErrorBuilder.fail("Unexpected dependency navigator: $navigator.")
6969
}
7070
}
7171

model/src/test/kotlin/utils/DependencyGraphConverterTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.ossreviewtoolkit.model.utils
2121

22-
import io.kotest.assertions.fail
22+
import io.kotest.assertions.AssertionErrorBuilder
2323
import io.kotest.core.spec.style.WordSpec
2424
import io.kotest.inspectors.forAll
2525
import io.kotest.matchers.collections.beEmpty
@@ -226,5 +226,5 @@ private fun Project.createResult(): ProjectAnalyzerResult {
226226
*/
227227
private fun AnalyzerResult.getProject(id: Identifier): Project {
228228
val project = projects.find { it.id == id }
229-
return project ?: fail("Could not find project with ID $id.")
229+
return project ?: AssertionErrorBuilder.fail("Could not find project with ID $id.")
230230
}

plugins/package-managers/carthage/src/test/kotlin/CarthageTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
package org.ossreviewtoolkit.plugins.packagemanagers.carthage
2121

2222
import io.kotest.assertions.throwables.shouldThrow
23-
import io.kotest.core.Tuple2
2423
import io.kotest.core.spec.style.WordSpec
2524
import io.kotest.core.test.TestCase
26-
import io.kotest.core.test.TestResult
25+
import io.kotest.engine.test.TestResult
2726
import io.kotest.matchers.shouldBe
2827

2928
import io.mockk.every
@@ -41,7 +40,7 @@ import org.ossreviewtoolkit.utils.test.USER_DIR
4140
class CarthageTest : WordSpec() {
4241
private val carthage = CarthageFactory.create()
4342

44-
override fun afterTest(f: suspend (Tuple2<TestCase, TestResult>) -> Unit) {
43+
override suspend fun afterTest(testCase: TestCase, result: TestResult) {
4544
unmockkAll()
4645
}
4746

plugins/package-managers/gradle-inspector/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ dependencies {
4444

4545
funTestImplementation(projects.plugins.versionControlSystems.gitVersionControlSystem)
4646
funTestImplementation(testFixtures(projects.analyzer))
47+
48+
funTestImplementation(libs.kotest.assertions.table)
4749
}
4850

4951
val processResources = tasks.named<Copy>("processResources") {

plugins/package-managers/gradle/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ dependencies {
4141
funTestImplementation(projects.plugins.versionControlSystems.gitVersionControlSystem)
4242
funTestImplementation(testFixtures(projects.analyzer))
4343

44+
funTestImplementation(libs.kotest.assertions.table)
45+
4446
testImplementation(projects.utils.spdxUtils)
4547

4648
testImplementation(libs.mockk)

plugins/scanners/fossid/src/test/kotlin/FossIdNamingProviderTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ package org.ossreviewtoolkit.plugins.scanners.fossid
2222
import io.kotest.assertions.throwables.shouldThrow
2323
import io.kotest.core.spec.style.WordSpec
2424
import io.kotest.core.test.TestCase
25-
import io.kotest.core.test.TestResult
25+
import io.kotest.engine.test.TestResult
2626
import io.kotest.matchers.equals.shouldBeEqual
2727
import io.kotest.matchers.ints.shouldBeLessThanOrEqual
2828

scanner/src/funTest/kotlin/provenance/AbstractNestedProvenanceStorageFunTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ abstract class AbstractNestedProvenanceStorageFunTest(vararg listeners: TestList
3434
protected abstract fun createStorage(): NestedProvenanceStorage
3535

3636
init {
37-
register(listeners.asList())
37+
extensions(listeners.asList())
3838

3939
beforeEach {
4040
storage = createStorage()

scanner/src/funTest/kotlin/provenance/AbstractPackageProvenanceStorageFunTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class AbstractPackageProvenanceStorageFunTest(vararg listeners: TestLis
4040
protected abstract fun createStorage(): PackageProvenanceStorage
4141

4242
init {
43-
register(listeners.asList())
43+
extensions(listeners.asList())
4444

4545
beforeEach {
4646
storage = createStorage()

0 commit comments

Comments
 (0)