Skip to content
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 .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotest.assertions.multi-line-diff=unified -Dkotest.tags=!ExpensiveTag
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotest.assertions.multi-line-diff=unified
REGISTRY: ghcr.io
TEST_IMAGE_TAG: ort:test

Expand Down
2 changes: 2 additions & 0 deletions cli/src/funTest/kotlin/AnalyzerFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.ossreviewtoolkit.cli

import io.kotest.core.TestConfiguration
import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.WordSpec
import io.kotest.engine.spec.tempdir
import io.kotest.matchers.concurrent.shouldCompleteWithin
Expand All @@ -42,6 +43,7 @@ import org.ossreviewtoolkit.plugins.packagemanagers.gradle.GradleFactory
import org.ossreviewtoolkit.plugins.versioncontrolsystems.git.GitRepoFactory
import org.ossreviewtoolkit.utils.test.readResourceValue

@Tags("RequiresExternalTool")
class AnalyzerFunTest : WordSpec({
"An analysis" should {
"correctly report git-repo repositories for projects" {
Expand Down
2 changes: 2 additions & 0 deletions cli/src/funTest/kotlin/ExamplesFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import com.icegreen.greenmail.util.ServerSetup

import io.kotest.assertions.throwables.shouldNotThrow
import io.kotest.assertions.withClue
import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.engine.spec.tempdir
import io.kotest.matchers.collections.beEmpty
Expand Down Expand Up @@ -69,6 +70,7 @@ import org.ossreviewtoolkit.utils.ort.ORT_RESOLUTIONS_FILENAME
import org.ossreviewtoolkit.utils.spdx.toSpdx
import org.ossreviewtoolkit.utils.test.readResourceValue

@Tags("RequiresExternalTool")
class ExamplesFunTest : StringSpec({
val examplesDir = File("../examples")
val exampleFiles = examplesDir.walk().maxDepth(1).filterTo(mutableListOf()) {
Expand Down
2 changes: 2 additions & 0 deletions downloader/src/funTest/kotlin/DownloaderFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.ossreviewtoolkit.downloader

import io.kotest.assertions.throwables.shouldThrow
import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.WordSpec
import io.kotest.engine.spec.tempdir
import io.kotest.matchers.collections.shouldHaveSize
Expand Down Expand Up @@ -47,6 +48,7 @@ import org.ossreviewtoolkit.utils.common.VCS_DIRECTORIES
import org.ossreviewtoolkit.utils.common.div
import org.ossreviewtoolkit.utils.ort.normalizeVcsUrl

@Tags("RequiresExternalTool")
class DownloaderFunTest : WordSpec({
lateinit var outputDir: File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.downloader

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.nulls.beNull
import io.kotest.matchers.nulls.shouldNotBeNull
Expand All @@ -30,6 +31,7 @@ import io.kotest.matchers.shouldNotBe
import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.plugins.api.PluginConfig

@Tags("RequiresExternalTool")
class VersionControlSystemFunTest : WordSpec({
"forUrl()" should {
"return null for an unsupported repository URL" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.licensefactproviders.scancode

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.WordSpec
import io.kotest.engine.spec.tempdir
import io.kotest.matchers.nulls.beNull
Expand All @@ -29,6 +30,7 @@ import io.kotest.matchers.string.startWith

import org.ossreviewtoolkit.utils.common.div

@Tags("RequiresExternalTool")
class ScanCodeLicenseFactProviderFunTest : WordSpec({
"getLicenseText()" should {
"read license texts from the configured directory" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packageconfigurationproviders.ortconfig

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.haveSize
Expand All @@ -29,6 +30,7 @@ import org.ossreviewtoolkit.model.Hash
import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.RemoteArtifact

@Tags("RequiresExternalTool")
class OrtConfigPackageConfigurationProviderFunTest : StringSpec({
"provider can load package-configurations from the ort-config repository" {
val id = Identifier("Maven:net.java.dev.jna:jna-platform:5.8.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagecurationproviders.ortconfig

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.should
Expand All @@ -27,6 +28,7 @@ import io.kotest.matchers.shouldNot
import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.Package

@Tags("RequiresExternalTool")
class OrtConfigPackageCurationProviderFunTest : StringSpec({
fun createProvider() = OrtConfigPackageCurationProviderFactory.create()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.bazel

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -29,6 +30,7 @@ import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult

@Tags("RequiresExternalTool")
class BazelDetectionFunTest : StringSpec({
"MODULE.bazel files present in a local registry should not be considered as definition files" {
val definitionFile = getAssetFile("projects/synthetic/bazel-local-registry2/MODULE.bazel")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.bazel

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.should
Expand All @@ -33,6 +34,7 @@ import org.ossreviewtoolkit.plugins.api.PluginConfig
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class BazelFunTest : StringSpec({
"Dependencies are detected correctly" {
val definitionFile = getAssetFile("projects/synthetic/bazel/MODULE.bazel")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.bower

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -27,6 +28,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class BowerFunTest : StringSpec({
"Project dependencies are detected correctly" {
val definitionFile = getAssetFile("projects/synthetic/bower/bower.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.bundler

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.shouldHaveSize
Expand All @@ -32,6 +33,8 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

// Requires Git to be able to use Gems from Git repositories.
@Tags("RequiresExternalTool")
class BundlerFunTest : WordSpec({
"Bundler" should {
"resolve dependencies correctly" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.cargo

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -27,6 +28,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class CargoFunTest : StringSpec({
"Projects dependencies are detected correctly" {
val definitionFile = getAssetFile("projects/synthetic/cargo/Cargo.toml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.cargo

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -27,6 +28,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class CargoSubcrateFunTest : StringSpec({
"Lib project dependencies are detected correctly" {
val definitionFile = getAssetFile("projects/synthetic/cargo-subcrate/Cargo.toml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.cocoapods

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.should

Expand All @@ -32,6 +33,7 @@ import org.ossreviewtoolkit.plugins.packagemanagers.node.npm.NpmFactory
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class CocoaPodsFunTest : WordSpec({
"resolveSingleProject()" should {
"determine dependencies from a Podfile without a dependency tree" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.composer

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.collections.containExactly
Expand All @@ -39,6 +40,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class ComposerFunTest : StringSpec({
"Project files from vendor directories are ignored" {
val projectFiles = ComposerFactory.create().mapDefinitionFiles(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.conan

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -40,6 +41,7 @@ import org.ossreviewtoolkit.utils.test.patchActualResult
* several times (CI checks are not impacted because they always start with an empty cache). A workaround is to delete
* the Conan cache before executing the tests, i.e. rm -Rf ~/.conan2/p/.
*/
@Tags("RequiresExternalTool")
class ConanFunTest : StringSpec({
"Project dependencies are detected correctly for conanfile.txt" {
val definitionFile = getAssetFile("projects/synthetic/conan-txt/conanfile.txt")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.go

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -33,6 +34,7 @@ import org.ossreviewtoolkit.utils.common.div
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class GoModFunTest : StringSpec({
val testDir = getAssetFile("projects/synthetic/gomod")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.gradleinspector

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -29,6 +30,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class GradleAndroidFunTest : StringSpec({
"Root project dependencies are detected correctly" {
val definitionFile = getAssetFile("projects/synthetic/gradle-android/build.gradle").toGradle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.gradleinspector

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.Spec
import io.kotest.core.spec.style.StringSpec
import io.kotest.data.forAll
Expand All @@ -38,6 +39,7 @@ import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult

@Tags("RequiresExternalTool")
class GradleFunTest : StringSpec() {
private val projectDir = getAssetFile("projects/synthetic/gradle").toGradle()
private val isJava9OrAbove = Environment.JAVA_VERSION.split('.').first().toInt() >= 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.gradle

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -29,6 +30,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class GradleAndroidFunTest : StringSpec({
"Root project dependencies are detected correctly" {
val definitionFile = getAssetFile("projects/synthetic/gradle-android/build.gradle")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.gradle

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.Spec
import io.kotest.core.spec.style.StringSpec
import io.kotest.data.forAll
Expand All @@ -38,6 +39,7 @@ import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult

@Tags("RequiresExternalTool")
class GradleFunTest : StringSpec() {
private val projectDir = getAssetFile("projects/synthetic/gradle")
private val isJava9OrAbove = Environment.JAVA_VERSION.split('.').first().toInt() >= 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.node.npm

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.engine.spec.tempdir
import io.kotest.inspectors.forAll
Expand All @@ -42,6 +43,7 @@ import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult
import org.ossreviewtoolkit.utils.test.patchExpectedResult

@Tags("RequiresExternalTool")
class NpmFunTest : StringSpec({
"Resolve dependencies for a project with a 'shrinkwrap.json' correctly" {
val definitionFile = getAssetFile("projects/synthetic/npm/shrinkwrap/package.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.node.pnpm

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.should

Expand All @@ -30,6 +31,7 @@ import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult

@Tags("RequiresExternalTool")
class PnpmFunTest : StringSpec({
"Resolve dependencies for a project with lockfile correctly" {
val definitionFile = getAssetFile("projects/synthetic/pnpm/project-with-lockfile/package.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.ossreviewtoolkit.plugins.packagemanagers.node.yarn

import io.kotest.core.annotation.Tags
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.collections.beEmpty
import io.kotest.matchers.should
Expand All @@ -30,6 +31,7 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

@Tags("RequiresExternalTool")
class YarnFunTest : StringSpec({
"Resolve dependencies for a project with lockfile correctly" {
val definitionFile = getAssetFile("projects/synthetic/yarn/project-with-lockfile/package.json")
Expand Down
Loading
Loading