Skip to content

Commit 37f093f

Browse files
committed
test(advisor): Properly set a PURL for OSV
This is a fixup for 444a035. Note that this will actually result in test failures, which is why 444a035 will be reverted in the next commit. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 1f08feb commit 37f093f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

advisor/src/funTest/kotlin/OsvFunTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import org.ossreviewtoolkit.model.Identifier
2929
import org.ossreviewtoolkit.model.Package
3030
import org.ossreviewtoolkit.model.config.OsvConfiguration
3131
import org.ossreviewtoolkit.model.readValue
32+
import org.ossreviewtoolkit.model.utils.toPurl
3233
import org.ossreviewtoolkit.utils.test.getAssetFile
3334

3435
class OsvFunTest : StringSpec({
@@ -77,7 +78,7 @@ class OsvFunTest : StringSpec({
7778
})
7879

7980
private fun identifierToPackage(id: String): Package =
80-
Package.EMPTY.copy(id = Identifier(id))
81+
Identifier(id).let { Package.EMPTY.copy(id = it, purl = it.toPurl()) }
8182

8283
private fun createOsv(): Osv =
8384
Osv("OSV", OsvConfiguration(serverUrl = null))

0 commit comments

Comments
 (0)