use of com.thoughtworks.studios.shine.cruise.stage.details.LazyStageGraphLoader in project gocd by gocd.
the class ShineDaoIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
dbHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao);
configHelper.onSetUp();
result = new SubsectionLocalizedOperationResult();
File tempFolder = temporaryFolder.newFolder("artifacts");
String artifactsRoot = tempFolder.getAbsolutePath();
stageStorage.clear();
StageResourceImporter importer = new StageResourceImporter(artifactsRoot, xmlApiService, stageService, pipelineHistoryService, systemEnvironment);
LazyStageGraphLoader graphLoader = new LazyStageGraphLoader(importer, stageStorage);
StagesQuery stagesQuery = new StagesQuery(graphLoader, stagesQueryCache);
shineDao = new ShineDao(stagesQuery, stageService, pipelineHistoryService);
goURLRepository = new StubGoURLRepository("http://localhost:8153", artifactsRoot);
failureSetup = new TestFailureSetup(materialRepository, dbHelper, pipelineTimeline, configHelper, transactionTemplate);
TestFailureSetup.SavedStage savedStage = failureSetup.setupPipelineInstance(true, null, goURLRepository);
pipeline = savedStage.pipeline;
stageId = savedStage.stageId;
}
Aggregations