@Test
  public void shouldStopAutoSchedulingIfDiskSpaceIsLessThanMinimum() throws Exception {
    diskSpaceSimulator.simulateDiskFull();

    scheduleHelper.autoSchedulePipelinesWithRealMaterials();

    assertThat(
        serverHealthService.getLogsAsText(),
        containsString(
            "Go Server has run out of artifacts disk space. Scheduling has been stopped"));
    assertThat(pipelineScheduleQueue.toBeScheduled().keySet(), not(hasItem(MINGLE_PIPELINE_NAME)));
  }
  @Test
  public void shouldStopManualSchedulingIfDiskSpaceIsLessThanMinimum() throws Exception {
    diskSpaceSimulator.simulateDiskFull();

    final HashMap<String, String> revisions = new HashMap<String, String>();
    final HashMap<String, String> environmentVariables = new HashMap<String, String>();
    buildCauseProducer.manualProduceBuildCauseAndSave(
        MINGLE_PIPELINE_NAME,
        Username.ANONYMOUS,
        new ScheduleOptions(revisions, environmentVariables, new HashMap<String, String>()),
        new ServerHealthStateOperationResult());

    assertThat(
        serverHealthService.getLogsAsText(),
        containsString(
            "Go Server has run out of artifacts disk space. Scheduling has been stopped"));
    assertThat(pipelineScheduleQueue.toBeScheduled().keySet(), not(hasItem(MINGLE_PIPELINE_NAME)));
  }