@@ -56,6 +56,7 @@ import org.eclipse.apoapsis.ortserver.model.Repository
5656import org.eclipse.apoapsis.ortserver.model.RepositoryType
5757import org.eclipse.apoapsis.ortserver.model.ScannerJob
5858import org.eclipse.apoapsis.ortserver.model.ScannerJobConfiguration
59+ import org.eclipse.apoapsis.ortserver.model.Severity
5960import org.eclipse.apoapsis.ortserver.model.WorkerJob
6061import org.eclipse.apoapsis.ortserver.model.orchestrator.AdvisorWorkerError
6162import org.eclipse.apoapsis.ortserver.model.orchestrator.AdvisorWorkerResult
@@ -387,7 +388,7 @@ class OrchestratorTest : WordSpec() {
387388 id = withArg { it shouldBe configWorkerError.ortRunId },
388389 status = withArg { it.verifyOptionalValue(OrtRunStatus .FAILED ) },
389390 issues = withArg {
390- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , ConfigEndpoint .configPrefix) }
391+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , ConfigEndpoint .configPrefix) }
391392 }
392393 )
393394 }
@@ -686,7 +687,7 @@ class OrchestratorTest : WordSpec() {
686687 ortRunRepository.update(
687688 id = withArg { it shouldBe analyzerJob.ortRunId },
688689 issues = withArg {
689- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , AnalyzerEndpoint .configPrefix) }
690+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , AnalyzerEndpoint .configPrefix) }
690691 }
691692 )
692693 }
@@ -892,7 +893,7 @@ class OrchestratorTest : WordSpec() {
892893 ortRunRepository.update(
893894 id = withArg { it shouldBe advisorJob.ortRunId },
894895 issues = withArg {
895- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , AdvisorEndpoint .configPrefix) }
896+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , AdvisorEndpoint .configPrefix) }
896897 }
897898 )
898899 }
@@ -983,7 +984,7 @@ class OrchestratorTest : WordSpec() {
983984 ortRunRepository.update(
984985 id = withArg { it shouldBe evaluatorJob.ortRunId },
985986 issues = withArg {
986- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , EvaluatorEndpoint .configPrefix) }
987+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , EvaluatorEndpoint .configPrefix) }
987988 }
988989 )
989990 }
@@ -1136,7 +1137,7 @@ class OrchestratorTest : WordSpec() {
11361137 ortRunRepository.update(
11371138 id = withArg { it shouldBe reporterJob.ortRunId },
11381139 issues = withArg {
1139- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , ReporterEndpoint .configPrefix) }
1140+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , ReporterEndpoint .configPrefix) }
11401141 }
11411142 )
11421143 }
@@ -1272,7 +1273,7 @@ class OrchestratorTest : WordSpec() {
12721273 ortRunRepository.update(
12731274 id = withArg { it shouldBe notifierJob.ortRunId },
12741275 issues = withArg {
1275- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , NotifierEndpoint .configPrefix) }
1276+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , NotifierEndpoint .configPrefix) }
12761277 }
12771278 )
12781279 }
@@ -1331,7 +1332,7 @@ class OrchestratorTest : WordSpec() {
13311332 ortRunRepository.update(
13321333 id = withArg { it shouldBe notifierJob.ortRunId },
13331334 issues = withArg {
1334- verifyIssues(it) { verifyWorkerErrorIssues(" ERROR" , NotifierEndpoint .configPrefix) }
1335+ verifyIssues(it) { verifyWorkerErrorIssues(Severity . ERROR , NotifierEndpoint .configPrefix) }
13351336 }
13361337 )
13371338 }
@@ -1837,7 +1838,7 @@ fun verifyIssues(
18371838 issuesList.validate()
18381839}
18391840
1840- fun Collection<Issue>.verifyWorkerErrorIssues (severity : String , source : String ) {
1841+ fun Collection<Issue>.verifyWorkerErrorIssues (severity : Severity , source : String ) {
18411842 shouldBeSingleton { issue ->
18421843 issue.severity shouldBe severity
18431844 issue.source shouldBe source
0 commit comments