Search in sources :

Example 1 with LazyStageGraphLoader

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;
}
Also used : StagesQuery(com.thoughtworks.studios.shine.cruise.stage.StagesQuery) StageResourceImporter(com.thoughtworks.studios.shine.cruise.stage.details.StageResourceImporter) SubsectionLocalizedOperationResult(com.thoughtworks.go.server.service.result.SubsectionLocalizedOperationResult) LazyStageGraphLoader(com.thoughtworks.studios.shine.cruise.stage.details.LazyStageGraphLoader) File(java.io.File) StubGoURLRepository(com.thoughtworks.studios.shine.net.StubGoURLRepository) Before(org.junit.Before)

Aggregations

SubsectionLocalizedOperationResult (com.thoughtworks.go.server.service.result.SubsectionLocalizedOperationResult)1 StagesQuery (com.thoughtworks.studios.shine.cruise.stage.StagesQuery)1 LazyStageGraphLoader (com.thoughtworks.studios.shine.cruise.stage.details.LazyStageGraphLoader)1 StageResourceImporter (com.thoughtworks.studios.shine.cruise.stage.details.StageResourceImporter)1 StubGoURLRepository (com.thoughtworks.studios.shine.net.StubGoURLRepository)1 File (java.io.File)1 Before (org.junit.Before)1