Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor test improvements #7554

Merged
merged 2 commits into from
Sep 21, 2023
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 advisor/src/funTest/kotlin/OsvFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class OsvFunTest : StringSpec({
"Go::github.com/nats-io/nats-server/v2:2.1.0",
"Maven:com.jfinal:jfinal:1.4",
"NPM::rebber:1.0.0",
"NuGet::Microsoft.ChakraCore:1.10.0",
"NuGet:Microsoft:ChakraCore:1.10.0",
"Pub::http:0.13.1",
"PyPI::Plone:3.2"
).mapTo(mutableSetOf()) {
Expand Down
10 changes: 3 additions & 7 deletions downloader/src/test/kotlin/VersionControlSystemTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import java.io.IOException
import java.lang.UnsupportedOperationException

import org.ossreviewtoolkit.downloader.vcs.Git
import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.VcsInfo
import org.ossreviewtoolkit.model.VcsType
Expand Down Expand Up @@ -77,10 +76,9 @@ class VersionControlSystemTest : WordSpec({
"getRevisionCandidates()" should {
"prefer a matching tag name over a branch name from metadata" {
val pkg = Package.EMPTY.copy(
id = Identifier("Gem::google-cloud-core:1.6.0"),
vcsProcessed = VcsInfo(
type = VcsType.GIT,
url = "https://github.com/googleapis/google-cloud-ruby.git",
url = "",
revision = "master"
)
)
Expand All @@ -96,12 +94,10 @@ class VersionControlSystemTest : WordSpec({

"add 'main' as a candidate for Git if otherwise 'master' is the only one" {
val pkg = Package.EMPTY.copy(
id = Identifier("NuGet::Microsoft.NETFramework.ReferenceAssemblies.net40:1.0.0-preview.2"),
vcsProcessed = VcsInfo(
type = VcsType.GIT,
url = "https://github.com/Microsoft/dotnet.git",
revision = "master",
path = "releases/reference-assemblies"
url = "",
revision = "master"
)
)

Expand Down