diff --git a/scanner/src/funTest/kotlin/storages/AbstractStorageFunTest.kt b/scanner/src/funTest/kotlin/storages/AbstractPackageBasedScanStorageFunTest.kt similarity index 99% rename from scanner/src/funTest/kotlin/storages/AbstractStorageFunTest.kt rename to scanner/src/funTest/kotlin/storages/AbstractPackageBasedScanStorageFunTest.kt index 6f9a24c170a66..60047d6996e23 100644 --- a/scanner/src/funTest/kotlin/storages/AbstractStorageFunTest.kt +++ b/scanner/src/funTest/kotlin/storages/AbstractPackageBasedScanStorageFunTest.kt @@ -53,7 +53,7 @@ import org.semver4j.Semver private val DUMMY_TEXT_LOCATION = TextLocation("fakepath", 13, 21) -abstract class AbstractStorageFunTest(vararg listeners: TestListener) : WordSpec() { +abstract class AbstractPackageBasedScanStorageFunTest(vararg listeners: TestListener) : WordSpec() { private val id = Identifier("type", "namespace", "name1", "version") private val sourceArtifact = RemoteArtifact("url1", Hash.create("0123456789abcdef0123456789abcdef01234567")) diff --git a/scanner/src/funTest/kotlin/storages/AbstractProvenanceBasedStorageFunTest.kt b/scanner/src/funTest/kotlin/storages/AbstractProvenanceBasedScanStorageFunTest.kt similarity index 98% rename from scanner/src/funTest/kotlin/storages/AbstractProvenanceBasedStorageFunTest.kt rename to scanner/src/funTest/kotlin/storages/AbstractProvenanceBasedScanStorageFunTest.kt index cb4b4f4767cdb..3a964ee967900 100644 --- a/scanner/src/funTest/kotlin/storages/AbstractProvenanceBasedStorageFunTest.kt +++ b/scanner/src/funTest/kotlin/storages/AbstractProvenanceBasedScanStorageFunTest.kt @@ -45,7 +45,7 @@ import org.ossreviewtoolkit.scanner.ProvenanceBasedScanStorage import org.ossreviewtoolkit.scanner.ScanStorageException import org.ossreviewtoolkit.scanner.ScannerMatcher -abstract class AbstractProvenanceBasedStorageFunTest(vararg listeners: TestListener) : WordSpec() { +abstract class AbstractProvenanceBasedScanStorageFunTest(vararg listeners: TestListener) : WordSpec() { private lateinit var storage: ProvenanceBasedScanStorage protected abstract fun createStorage(): ProvenanceBasedScanStorage diff --git a/scanner/src/funTest/kotlin/storages/FileBasedStorageFunTest.kt b/scanner/src/funTest/kotlin/storages/FileBasedStorageFunTest.kt index 175a9b18c7a83..2235d16af2eb7 100644 --- a/scanner/src/funTest/kotlin/storages/FileBasedStorageFunTest.kt +++ b/scanner/src/funTest/kotlin/storages/FileBasedStorageFunTest.kt @@ -23,6 +23,6 @@ import io.kotest.engine.spec.tempdir import org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage -class FileBasedStorageFunTest : AbstractStorageFunTest() { +class FileBasedStorageFunTest : AbstractPackageBasedScanStorageFunTest() { override fun createStorage() = FileBasedStorage(LocalFileStorage(tempdir())) } diff --git a/scanner/src/funTest/kotlin/storages/PostgresStorageFunTest.kt b/scanner/src/funTest/kotlin/storages/PostgresStorageFunTest.kt index 7f75021ae40d5..8b28921fea909 100644 --- a/scanner/src/funTest/kotlin/storages/PostgresStorageFunTest.kt +++ b/scanner/src/funTest/kotlin/storages/PostgresStorageFunTest.kt @@ -23,6 +23,6 @@ import org.ossreviewtoolkit.utils.test.PostgresListener private val postgresListener = PostgresListener() -class PostgresStorageFunTest : AbstractStorageFunTest(postgresListener) { +class PostgresStorageFunTest : AbstractPackageBasedScanStorageFunTest(postgresListener) { override fun createStorage() = PostgresStorage(dataSource = postgresListener.dataSource) } diff --git a/scanner/src/funTest/kotlin/storages/ProvenanceBasedFileStorageFunTest.kt b/scanner/src/funTest/kotlin/storages/ProvenanceBasedFileStorageFunTest.kt index b5de56ece21b2..13eceabb47887 100644 --- a/scanner/src/funTest/kotlin/storages/ProvenanceBasedFileStorageFunTest.kt +++ b/scanner/src/funTest/kotlin/storages/ProvenanceBasedFileStorageFunTest.kt @@ -23,6 +23,6 @@ import io.kotest.engine.spec.tempdir import org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage -class ProvenanceBasedFileStorageFunTest : AbstractProvenanceBasedStorageFunTest() { +class ProvenanceBasedFileStorageFunTest : AbstractProvenanceBasedScanStorageFunTest() { override fun createStorage() = ProvenanceBasedFileStorage(LocalFileStorage(tempdir())) } diff --git a/scanner/src/funTest/kotlin/storages/ProvenanceBasedPostgresStorageFunTest.kt b/scanner/src/funTest/kotlin/storages/ProvenanceBasedPostgresStorageFunTest.kt index 465f8e06bcf41..d4b9a135ae699 100644 --- a/scanner/src/funTest/kotlin/storages/ProvenanceBasedPostgresStorageFunTest.kt +++ b/scanner/src/funTest/kotlin/storages/ProvenanceBasedPostgresStorageFunTest.kt @@ -23,6 +23,6 @@ import org.ossreviewtoolkit.utils.test.PostgresListener private val postgresListener = PostgresListener() -class ProvenanceBasedPostgresStorageFunTest : AbstractProvenanceBasedStorageFunTest(postgresListener) { +class ProvenanceBasedPostgresStorageFunTest : AbstractProvenanceBasedScanStorageFunTest(postgresListener) { override fun createStorage() = ProvenanceBasedPostgresStorage(postgresListener.dataSource) }