Skip to content

Commit

Permalink
chore(subversion): Align test code for comparing files
Browse files Browse the repository at this point in the history
Make this more similar to the code used in other tests in the same file.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth committed Apr 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2f57ea0 commit 0e56143
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -76,17 +76,16 @@ class SubversionDownloadFunTest : StringSpec() {
vcsProcessed = VcsInfo(VcsType.SUBVERSION, REPO_URL, REPO_REV, path = REPO_PATH)
)
val expectedFiles = listOf(
File(REPO_PATH, "checkyear.js"),
File(REPO_PATH, "coverity.bat")
"$REPO_PATH/checkyear.js",
"$REPO_PATH/coverity.bat"
)

val workingTree = svn.download(pkg, outputDir)
val actualFiles = workingTree.workingDir.walkBottomUp()
val actualFiles = workingTree.workingDir.walk()
.onEnter { it.name !in VCS_DIRECTORIES }
.filter { it.isFile }
.map { it.relativeTo(outputDir) }
.sortedBy { it.path }
.toList()
.mapTo(mutableListOf()) { it.toRelativeString(workingTree.workingDir) }
.sorted()

workingTree.isValid() shouldBe true
workingTree.getRevision() shouldBe REPO_REV

0 comments on commit 0e56143

Please sign in to comment.