use of com.thoughtworks.go.domain.PipelineIdentifier in project gocd by gocd.
the class SchedulingCheckerServiceIntegrationTest method shouldNotPassCheckingIfDiskSpaceIsFullForRerun.
@Test
public void shouldNotPassCheckingIfDiskSpaceIsFullForRerun() throws Exception {
String limit = diskSpaceSimulator.simulateDiskFull();
String pipelineName = pipelineFixture.pipelineName;
String label = "LATEST";
String stageName = CaseInsensitiveString.str(pipelineFixture.devStage().name());
ServerHealthStateOperationResult result = new ServerHealthStateOperationResult();
configFileHelper.addAuthorizedUserForStage(pipelineName, stageName, APPROVED_USER);
assertThat(schedulingChecker.canScheduleStage(new PipelineIdentifier(pipelineName, 1, label), stageName, APPROVED_USER, result), is(false));
assertThat(result.getServerHealthState().getDescription(), containsString(String.format("GoCD has less than %sb of disk space", limit)));
}
Aggregations