Skip to content

Commit

Permalink
ScannerIntegrationFunTest: Use Instant.EPOCH as start and end time
Browse files Browse the repository at this point in the history
The test does cover the values used for these times. So, use
`Instant.EPOCH` for making the value deterministic, for aligning with
other "empty" default values. While at it also inline the variable to
simplify an upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Oct 12, 2022
1 parent b76e577 commit 800483c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ class ScannerIntegrationFunTest : StringSpec() {
override val criteria: ScannerCriteria = ScannerCriteria.forDetails(details)

override fun scanPath(path: File, context: ScanContext): ScanSummary {
val time = Instant.now()

val licenseFindings = path.listFiles().orEmpty().mapTo(sortedSetOf()) { file ->
LicenseFinding(
license = SpdxConstants.NONE,
Expand All @@ -107,8 +105,8 @@ class ScannerIntegrationFunTest : StringSpec() {
}

return ScanSummary(
startTime = time,
endTime = time,
startTime = Instant.EPOCH,
endTime = Instant.EPOCH,
packageVerificationCode = "",
licenseFindings = licenseFindings,
copyrightFindings = sortedSetOf(),
Expand Down

0 comments on commit 800483c

Please sign in to comment.