Skip to content

Commit

Permalink
test(*ProvenanceResolverFunTest): Add tests for Subversion
Browse files Browse the repository at this point in the history
Disable one of the tests as the underlying issue [1] still needs to be
fixed, but keep the test as a reproducer.

[1]: #6160

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
  • Loading branch information
sschuberth committed Feb 14, 2023
1 parent cc5f436 commit c5e2789
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,20 @@ class DefaultNestedProvenanceResolverFunTest : WordSpec() {
NestedProvenance(root = provenance, subRepositories = emptyMap())
}
}

"work for Subversion tags".config(enabled = false /* This needs fixing, see ORT issue 6160. */) {
val provenance = RepositoryProvenance(
vcsInfo = VcsInfo(
type = VcsType.SUBVERSION,
url = "https://svn.apache.org/repos/asf/xerces/xml-commons",
revision = "tags/xml-commons-external-1_3_03"
),
resolvedRevision = "380970"
)

resolver.resolveNestedProvenance(provenance) shouldBe
NestedProvenance(root = provenance, subRepositories = emptyMap())
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@ class DefaultPackageProvenanceResolverFunTest : WordSpec() {
resolvedRevision = "ad0367b7b9920144a47b8d30cc0c84cea102b821"
)
}

"work for Subversion tags" {
val pkg = Package.EMPTY.copy(
id = Identifier("Maven:xml-apis:xml-apis:1.3.03"),
vcsProcessed = VcsInfo(
type = VcsType.SUBVERSION,
url = "https://svn.apache.org/repos/asf/xerces/xml-commons",
revision = "tags/xml-commons-external-1_3_03"
)
)

resolver.resolveProvenance(pkg, listOf(SourceCodeOrigin.VCS)) shouldBe
RepositoryProvenance(
vcsInfo = pkg.vcsProcessed,
resolvedRevision = "380970"
)
}
}

"Resolving the provenance for multiple origins" should {
Expand Down

0 comments on commit c5e2789

Please sign in to comment.