Search in sources :

Example 21 with StageInstanceModel

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

the class PipelineHistoryServiceIntegrationTest method shouldMakePipelineInstanceCanRunFalseWhenDiskSpaceIsEmpty.

@Test
public void shouldMakePipelineInstanceCanRunFalseWhenDiskSpaceIsEmpty() throws Exception {
    diskIsFull.onSetUp();
    configHelper.updateArtifactRoot(TestFileUtil.createTempFolder("serverlogs").getAbsolutePath());
    pipelineOne.createdPipelineWithAllStagesPassed();
    PipelineInstanceModels history = pipelineHistoryService.load(pipelineOne.pipelineName, Pagination.pageStartingAt(0, 1, 10), "jez", true);
    assertThat(history.size(), is(1));
    assertThat(history.first().getCanRun(), is(false));
    StageInstanceModels stageHistory = history.first().getStageHistory();
    assertThat(stageHistory.size(), is(3));
    for (StageInstanceModel stageHistoryItem : stageHistory) {
        assertThat(stageHistoryItem.isScheduled(), is(true));
        assertThat(stageHistoryItem.getCanRun(), is(false));
    }
}
Also used : PipelineInstanceModels(com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModels) StageInstanceModels(com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels) StageInstanceModel(com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModel) Test(org.junit.Test)

Aggregations

StageInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModel)21 StageInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels)13 PipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel)8 Test (org.junit.Test)8 StageIdentifier (com.thoughtworks.go.domain.StageIdentifier)6 PipelineInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModels)5 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)4 MaterialConfigs (com.thoughtworks.go.config.materials.MaterialConfigs)3 PipelineDependencyGraphOld (com.thoughtworks.go.domain.PipelineDependencyGraphOld)3 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)2 JobHistory (com.thoughtworks.go.presentation.pipelinehistory.JobHistory)2 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2 StageConfig (com.thoughtworks.go.config.StageConfig)1 DefaultSchedulingContext (com.thoughtworks.go.domain.DefaultSchedulingContext)1 MaterialRevision (com.thoughtworks.go.domain.MaterialRevision)1 PipelinePauseInfo (com.thoughtworks.go.domain.PipelinePauseInfo)1 PipelineTimelineEntry (com.thoughtworks.go.domain.PipelineTimelineEntry)1 EmptyPipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.EmptyPipelineInstanceModel)1 NullStageHistoryItem (com.thoughtworks.go.presentation.pipelinehistory.NullStageHistoryItem)1 PipelineGroupModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineGroupModel)1