@@ -48,6 +48,7 @@ import org.eclipse.apoapsis.ortserver.model.EvaluatorJobConfiguration
4848import org.eclipse.apoapsis.ortserver.model.JobConfigurations
4949import org.eclipse.apoapsis.ortserver.model.Jobs
5050import org.eclipse.apoapsis.ortserver.model.NotifierJobConfiguration
51+ import org.eclipse.apoapsis.ortserver.model.OrtRun
5152import org.eclipse.apoapsis.ortserver.model.PluginConfig
5253import org.eclipse.apoapsis.ortserver.model.ReporterJobConfiguration
5354import org.eclipse.apoapsis.ortserver.model.RepositoryType
@@ -196,6 +197,33 @@ class Fixtures(private val db: Database) {
196197 return Jobs (analyzerJob, advisorJob, scannerJob, evaluatorJob, reporterJob, notifierJob)
197198 }
198199
200+ fun createAnalyzerRunWithPackages (
201+ packages : Set <Package >,
202+ repositoryId : Long = createRepository().id,
203+ projects : Set <Project > = emptySet(),
204+ shortestPaths : Map <Identifier , List <ShortestDependencyPath >> = emptyMap()
205+ ): OrtRun {
206+ val ortRun = createOrtRun(
207+ repositoryId = repositoryId,
208+ revision = " revision" ,
209+ jobConfigurations = JobConfigurations ()
210+ )
211+
212+ val analyzerJob = createAnalyzerJob(
213+ ortRunId = ortRun.id,
214+ configuration = AnalyzerJobConfiguration (),
215+ )
216+
217+ createAnalyzerRun(
218+ analyzerJobId = analyzerJob.id,
219+ projects = projects,
220+ packages = packages,
221+ shortestDependencyPaths = shortestPaths
222+ )
223+
224+ return ortRun
225+ }
226+
199227 fun createIdentifier (
200228 identifier : Identifier = Identifier (
201229 "identifier_type",
0 commit comments