Search in sources :

Example 1 with EmptyPipelineInstanceModel

use of com.thoughtworks.go.presentation.pipelinehistory.EmptyPipelineInstanceModel in project gocd by gocd.

the class PipelineHistoryServiceIntegrationTest method shouldNotLoadDuplicatPlaceholderStages.

@Test
public void shouldNotLoadDuplicatPlaceholderStages() throws Exception {
    goConfigService.addPipeline(PipelineConfigMother.createPipelineConfig("pipeline", "stage", "job"), "pipeline-group");
    PipelineInstanceModels history = pipelineHistoryService.load("pipeline", Pagination.pageStartingAt(0, 1, 10), "anyone", true);
    PipelineInstanceModel instanceModel = history.first();
    assertThat(instanceModel instanceof EmptyPipelineInstanceModel, is(true));
    StageInstanceModels stageHistory = instanceModel.getStageHistory();
    assertThat(stageHistory.size(), is(1));
    assertThat(stageHistory.first() instanceof NullStageHistoryItem, is(true));
}
Also used : NullStageHistoryItem(com.thoughtworks.go.presentation.pipelinehistory.NullStageHistoryItem) PipelineInstanceModels(com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModels) EmptyPipelineInstanceModel(com.thoughtworks.go.presentation.pipelinehistory.EmptyPipelineInstanceModel) PipelineInstanceModel(com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel) EmptyPipelineInstanceModel(com.thoughtworks.go.presentation.pipelinehistory.EmptyPipelineInstanceModel) StageInstanceModels(com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels) Test(org.junit.Test)

Aggregations

EmptyPipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.EmptyPipelineInstanceModel)1 NullStageHistoryItem (com.thoughtworks.go.presentation.pipelinehistory.NullStageHistoryItem)1 PipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel)1 PipelineInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModels)1 StageInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels)1 Test (org.junit.Test)1