Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update kotest to v5.9.1 #8728

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion advisor/src/test/kotlin/AdvisorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package org.ossreviewtoolkit.advisor

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.maps.beEmpty
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.types.beTheSameInstanceAs
Expand All @@ -38,7 +39,6 @@ import org.ossreviewtoolkit.model.OrtResult
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.Project
import org.ossreviewtoolkit.model.config.AdvisorConfiguration
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class AdvisorTest : WordSpec({
"retrieveFindings" should {
Expand Down
2 changes: 1 addition & 1 deletion analyzer/src/test/kotlin/AnalyzerResultBuilderTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import io.kotest.matchers.collections.containExactlyInAnyOrder
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.collections.shouldNotContain
import io.kotest.matchers.maps.containExactly
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.types.beTheSameInstanceAs
Expand All @@ -52,7 +53,6 @@ import org.ossreviewtoolkit.model.config.ScopeExcludeReason
import org.ossreviewtoolkit.model.fromYaml
import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.model.yamlMapper
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class AnalyzerResultBuilderTest : WordSpec() {
private val issue1 = Issue(timestamp = Instant.EPOCH, source = "source-1", message = "message-1")
Expand Down
3 changes: 1 addition & 2 deletions analyzer/src/testFixtures/kotlin/TestUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import org.ossreviewtoolkit.model.config.RepositoryConfiguration
import org.ossreviewtoolkit.model.config.ScopeExclude
import org.ossreviewtoolkit.model.config.ScopeExcludeReason
import org.ossreviewtoolkit.utils.test.USER_DIR
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

fun PackageManager.resolveSingleProject(definitionFile: File, resolveScopes: Boolean = false): ProjectAnalyzerResult {
val managerResult = resolveDependencies(listOf(definitionFile), emptyMap())
Expand All @@ -69,7 +68,7 @@ fun PackageManager.collateMultipleProjects(vararg definitionFiles: File): Analyz
builder.addDependencyGraph(managerName, it).addPackages(managerResult.sharedPackages)
}
definitionFiles.forAll { definitionFile ->
managerResult.projectResults[definitionFile].shouldNotBeNull {
managerResult.projectResults[definitionFile] shouldNotBeNull {
this shouldHaveAtLeastSize 1
forEach { builder.addResult(it) }
}
Expand Down
2 changes: 1 addition & 1 deletion cli/src/funTest/kotlin/ExamplesFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.shouldContain
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNot
Expand Down Expand Up @@ -65,7 +66,6 @@ import org.ossreviewtoolkit.utils.ort.ORT_REPO_CONFIG_FILENAME
import org.ossreviewtoolkit.utils.ort.ORT_RESOLUTIONS_FILENAME
import org.ossreviewtoolkit.utils.spdx.toSpdx
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class ExamplesFunTest : StringSpec({
val examplesDir = File("../examples")
Expand Down
2 changes: 1 addition & 1 deletion cli/src/funTest/kotlin/OrtMainFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import io.kotest.engine.spec.tempdir
import io.kotest.engine.spec.tempfile
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.haveSize
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe

Expand All @@ -47,7 +48,6 @@ import org.ossreviewtoolkit.utils.ort.ORT_REFERENCE_CONFIG_FILENAME
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

/**
* A test for the main entry point of the application.
Expand Down
2 changes: 1 addition & 1 deletion clients/scanoss/src/test/kotlin/ScanOssDetailsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.maps.shouldHaveKey
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNot
Expand All @@ -37,7 +38,6 @@ import okhttp3.MultipartBody
import okhttp3.RequestBody.Companion.asRequestBody

import org.ossreviewtoolkit.clients.scanoss.model.Source
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

private const val SCANOSS_DETAILS_RESPONSE_FILENAME = "osskb.c"

Expand Down
2 changes: 1 addition & 1 deletion clients/scanoss/src/test/kotlin/ScanOssServiceTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.maps.shouldHaveKey
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNot

Expand All @@ -36,7 +37,6 @@ import okhttp3.MultipartBody
import okhttp3.RequestBody.Companion.asRequestBody

import org.ossreviewtoolkit.clients.scanoss.model.IdentificationType
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

/**
* The default filename in a SCANOSS response.
Expand Down
2 changes: 1 addition & 1 deletion downloader/src/funTest/kotlin/DownloaderFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import io.kotest.core.spec.style.WordSpec
import io.kotest.engine.spec.tempdir
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.file.aFile
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.string.endWith
Expand All @@ -44,7 +45,6 @@ import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.model.config.DownloaderConfiguration
import org.ossreviewtoolkit.utils.common.VCS_DIRECTORIES
import org.ossreviewtoolkit.utils.ort.normalizeVcsUrl
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class DownloaderFunTest : WordSpec({
lateinit var outputDir: File
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jiraRestClient = "5.2.7"
jruby = "9.4.7.0"
jslt = "0.1.14"
jsonSchemaValidator = "1.4.0"
kotest = "5.9.0"
kotest = "5.9.1"
kotlinxCoroutines = "1.8.1"
kotlinxHtml = "0.11.0"
kotlinxSerialization = "1.6.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.ossreviewtoolkit.model.utils

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.shouldBe

import java.io.ByteArrayInputStream
Expand All @@ -33,7 +34,6 @@ import org.ossreviewtoolkit.model.VcsInfo
import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.model.config.FileArchiverConfiguration
import org.ossreviewtoolkit.utils.test.PostgresListener
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

private val SOURCE_ARTIFACT_PROVENANCE = ArtifactProvenance(sourceArtifact = RemoteArtifact("url", Hash.create("hash")))
private val VCS_PROVENANCE = RepositoryProvenance(
Expand Down
2 changes: 1 addition & 1 deletion model/src/test/kotlin/AbstractDependencyNavigatorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.kotest.matchers.collections.containExactlyInAnyOrder
import io.kotest.matchers.collections.haveSize
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.maps.containExactly as containExactlyEntries
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.sequences.beEmpty as beEmptySequence
import io.kotest.matchers.sequences.containAllInAnyOrder
import io.kotest.matchers.should
Expand All @@ -39,7 +40,6 @@ import java.io.File
import java.time.Instant

import org.ossreviewtoolkit.utils.test.readOrtResult
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

/**
* A base class for tests of concrete [DependencyNavigator] implementations.
Expand Down
4 changes: 2 additions & 2 deletions model/src/test/kotlin/ScannerRunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ package org.ossreviewtoolkit.model

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.nulls.shouldNotBeNull

import org.ossreviewtoolkit.model.FileList.Entry
import org.ossreviewtoolkit.model.utils.alignRevisions
import org.ossreviewtoolkit.model.utils.clearVcsPath
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class ScannerRunTest : WordSpec({
"getFileList()" should {
Expand Down Expand Up @@ -89,7 +89,7 @@ class ScannerRunTest : WordSpec({
)
)

run.getFileList(id).shouldNotBeNull {
run.getFileList(id) shouldNotBeNull {
files shouldContainExactlyInAnyOrder listOf(
Entry("vcs/path/file1.txt", "1111111111111111111111111111111111111111"),
Entry("vcs/path/sub/repository/some/dir/file4.txt", "4444444444444444444444444444444444444444")
Expand Down
3 changes: 1 addition & 2 deletions model/src/test/kotlin/config/AnalyzerConfigurationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.containExactly
import io.kotest.matchers.maps.containExactly as containExactlyEntries
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNot

import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class AnalyzerConfigurationTest : WordSpec({
"AnalyzerConfiguration()" should {
"throw an exception on duplicate package manager configuration" {
Expand Down
2 changes: 1 addition & 1 deletion model/src/test/kotlin/config/OrtConfigurationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.maps.containExactly as containExactlyEntries
import io.kotest.matchers.maps.shouldContainExactly
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.types.shouldBeInstanceOf
Expand All @@ -42,7 +43,6 @@ import org.ossreviewtoolkit.model.Severity
import org.ossreviewtoolkit.model.SourceCodeOrigin
import org.ossreviewtoolkit.utils.common.EnvironmentVariableFilter
import org.ossreviewtoolkit.utils.ort.ORT_REFERENCE_CONFIG_FILENAME
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class OrtConfigurationTest : WordSpec({
"OrtConfiguration" should {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ package org.ossreviewtoolkit.model.config
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.containExactly
import io.kotest.matchers.maps.containExactly as containExactlyEntries
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should

import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class PackageManagerConfigurationTest : WordSpec({
"merge" should {
"prioritize mustRunAfter from other" {
Expand Down
4 changes: 2 additions & 2 deletions model/src/test/kotlin/config/ReporterConfigurationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
package org.ossreviewtoolkit.model.config

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.shouldBe

import java.io.File

import org.ossreviewtoolkit.model.fromYaml
import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.ort.ORT_REFERENCE_CONFIG_FILENAME
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class ReporterConfigurationTest : WordSpec({
"Reporter secrets" should {
"not be serialized as they contain sensitive information" {
rereadReporterConfig(loadReporterConfig()).config?.get("FossId").shouldNotBeNull {
rereadReporterConfig(loadReporterConfig()).config?.get("FossId") shouldNotBeNull {
secrets shouldBe emptyMap()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import io.kotest.assertions.throwables.shouldThrow
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.haveSize
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.string.shouldContain
Expand All @@ -35,7 +36,6 @@ import org.ossreviewtoolkit.model.TextLocation
import org.ossreviewtoolkit.model.config.snippet.SnippetChoiceReason
import org.ossreviewtoolkit.model.fromYaml
import org.ossreviewtoolkit.utils.spdx.toSpdx
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class RepositoryConfigurationTest : WordSpec({
"RepositoryConfiguration" should {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import io.kotest.matchers.collections.containExactlyInAnyOrder
import io.kotest.matchers.collections.shouldBeEmpty
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.string.shouldContain
import io.kotest.matchers.string.shouldNotContain

import org.ossreviewtoolkit.utils.spdx.SpdxSingleLicenseExpression
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class LicenseClassificationsTest : WordSpec({
"init()" should {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import io.kotest.matchers.collections.containExactlyInAnyOrder
import io.kotest.matchers.collections.haveSize
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.neverNullMatcher
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe

Expand Down Expand Up @@ -65,7 +66,6 @@ import org.ossreviewtoolkit.utils.spdx.SpdxSingleLicenseExpression
import org.ossreviewtoolkit.utils.spdx.getLicenseText
import org.ossreviewtoolkit.utils.spdx.toSpdx
import org.ossreviewtoolkit.utils.test.createDefault
import org.ossreviewtoolkit.utils.test.shouldNotBeNull
import org.ossreviewtoolkit.utils.test.transformingCollectionEmptyMatcher
import org.ossreviewtoolkit.utils.test.transformingCollectionMatcher

Expand Down
4 changes: 2 additions & 2 deletions model/src/test/kotlin/utils/DependencyGraphBuilderTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import io.kotest.matchers.collections.containExactlyInAnyOrder
import io.kotest.matchers.collections.shouldContainExactly
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.string.shouldContain
Expand All @@ -40,7 +41,6 @@ import org.ossreviewtoolkit.model.PackageLinkage
import org.ossreviewtoolkit.model.PackageReference
import org.ossreviewtoolkit.model.RootDependencyIndex
import org.ossreviewtoolkit.model.Scope
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class DependencyGraphBuilderTest : WordSpec({
"DependencyGraphBuilder" should {
Expand Down Expand Up @@ -217,7 +217,7 @@ class DependencyGraphBuilderTest : WordSpec({

scopeDependencies(scopes, scope) shouldContainExactly listOf(depCyc2)

graph.nodes.shouldNotBeNull {
graph.nodes shouldNotBeNull {
this shouldHaveSize 3
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.collections.shouldContainOnly
import io.kotest.matchers.ints.shouldBeLessThan
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNot
Expand All @@ -49,7 +50,6 @@ import org.ossreviewtoolkit.model.config.Excludes
import org.ossreviewtoolkit.model.config.ScopeExclude
import org.ossreviewtoolkit.model.config.ScopeExcludeReason
import org.ossreviewtoolkit.model.readValue
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class DependencyGraphConverterTest : WordSpec({
"convertToDependencyGraphs" should {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import io.kotest.core.spec.IsolationMode
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.containExactlyInAnyOrder
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe

Expand All @@ -35,7 +36,6 @@ import org.ossreviewtoolkit.model.config.LicenseFindingCurationReason.INCORRECT
import org.ossreviewtoolkit.model.licenses.LicenseFindingCurationResult
import org.ossreviewtoolkit.utils.spdx.SpdxConstants
import org.ossreviewtoolkit.utils.spdx.toSpdx
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class FindingCurationMatcherTest : WordSpec() {
private val matcher = FindingCurationMatcher()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import io.kotest.inspectors.forAll
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.containExactly
import io.kotest.matchers.collections.shouldHaveSingleElement
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe

Expand All @@ -46,7 +47,6 @@ import org.ossreviewtoolkit.model.utils.toPurl
import org.ossreviewtoolkit.model.vulnerabilities.Vulnerability
import org.ossreviewtoolkit.model.vulnerabilities.VulnerabilityReference
import org.ossreviewtoolkit.utils.common.enumSetOf
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class OssIndexTest : WordSpec({
val server = WireMockServer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ package org.ossreviewtoolkit.plugins.advisors.vulnerablecode
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.shouldContainAll
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.should
import io.kotest.matchers.shouldBe

import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.utils.toPurl
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class VulnerableCodeFunTest : WordSpec({
"Vulnerable Maven packages" should {
Expand Down
Loading
Loading