Skip to content

Commit

Permalink
test(vulnerable-code): Always enable the test, even without an API key
Browse files Browse the repository at this point in the history
VulnerableCode recently relaxed its usage and can be used without an API
key now, also see [1].

[1]: aboutcode-org/vulnerablecode#1352

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Nov 30, 2023
1 parent 55e226f commit 4bf0241
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ import org.ossreviewtoolkit.model.utils.toPurl
import org.ossreviewtoolkit.utils.test.shouldNotBeNull

class VulnerableCodeFunTest : StringSpec({
// Enter an API key to enable the test.
val apiKey = ""

"Findings should be returned for a vulnerable package".config(enabledIf = { apiKey.isNotEmpty() }) {
val vc = VulnerableCode("VulnerableCode", VulnerableCodeConfiguration(apiKey = apiKey))
"Findings should be returned for a vulnerable package" {
val vc = VulnerableCode("VulnerableCode", VulnerableCodeConfiguration())
val id = Identifier("Maven:com.google.guava:guava:19.0")
val pkg = Package.EMPTY.copy(id, purl = id.toPurl())

Expand Down

0 comments on commit 4bf0241

Please sign in to comment.