Skip to content

Commit 5210412

Browse files
committed
style(osv): Trivially arrange variables a bit
Move `expectedResult` closer to its use to align with the layout of the other test case. Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
1 parent 7b40375 commit 5210412

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

plugins/advisors/osv/src/funTest/kotlin/OsvFunTest.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,8 @@ class OsvFunTest : WordSpec({
6363
}
6464

6565
"return the expected result for the given package(s)" {
66-
val expectedResult = readResourceValue<Map<Identifier, AdvisorResult>>(
67-
"/retrieve-package-findings-expected-result.json"
68-
)
69-
7066
val osv = createOsv()
67+
7168
// The following packages have been chosen because they have only one vulnerability with the oldest possible
7269
// modified date from the current OSV database, in order to hopefully minimize the flakiness.
7370
val packages = setOf(
@@ -83,6 +80,10 @@ class OsvFunTest : WordSpec({
8380

8481
val packageFindings = osv.retrievePackageFindings(packages).mapKeys { it.key.id }
8582

83+
val expectedResult = readResourceValue<Map<Identifier, AdvisorResult>>(
84+
"/retrieve-package-findings-expected-result.json"
85+
)
86+
8687
packageFindings.patchTimes() shouldBe expectedResult.patchTimes()
8788
}
8889
}

0 commit comments

Comments
 (0)