Skip to content

Commit 3e68aa0

Browse files
committed
test(scanoss): Disable the spec when running at cloud providers
Quoting a "Software Transparency Foundation announcement to osskb.org users" on their mailing list [1][2]: "Starting on March 23rd 2026, osskb.org users hosted at major cloud providers will required a specific API key [...]" Disable these tests on GitHub action CI until the ORT project received such an API key. [1]: https://www.freelists.org/post/st-foundation/STF-announcement-to-osskborg-users [2]: https://071e29bb-d2ae-4e1f-9859-c5c196cedf94.filesusr.com/ugd/05bfb0_8d98824774044e6880de614ca8c11c7e.pdf Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
1 parent ae1861b commit 3e68aa0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

plugins/scanners/scanoss/src/funTest/kotlin/ScanOssFunTest.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ package org.ossreviewtoolkit.plugins.scanners.scanoss
2121

2222
import com.scanoss.rest.ScanApi
2323

24+
import io.kotest.core.annotation.Condition
25+
import io.kotest.core.annotation.EnabledIf
26+
import io.kotest.core.spec.Spec
2427
import io.kotest.core.spec.style.StringSpec
2528
import io.kotest.matchers.collections.beEmpty
2629
import io.kotest.matchers.collections.shouldBeSingleton
2730
import io.kotest.matchers.maps.shouldContainExactly
2831
import io.kotest.matchers.should
2932
import io.kotest.matchers.shouldBe
3033

34+
import kotlin.reflect.KClass
35+
3136
import org.ossreviewtoolkit.model.PackageType
3237
import org.ossreviewtoolkit.model.RepositoryProvenance
3338
import org.ossreviewtoolkit.model.TextLocation
@@ -38,6 +43,7 @@ import org.ossreviewtoolkit.scanner.ScanContext
3843
import org.ossreviewtoolkit.utils.spdx.toSpdx
3944
import org.ossreviewtoolkit.utils.test.extractResource
4045

46+
@EnabledIf(CloudCheck::class)
4147
class ScanOssFunTest : StringSpec({
4248
val apiKey = System.getenv("SCANOSS_API_KEY")
4349
val scanner = if (apiKey != null) {
@@ -102,3 +108,7 @@ class ScanOssFunTest : StringSpec({
102108
}
103109
}
104110
})
111+
112+
internal class CloudCheck : Condition {
113+
override fun evaluate(kclass: KClass<out Spec>): Boolean = System.getenv("CI") != "true"
114+
}

0 commit comments

Comments
 (0)