Search in sources :

Example 11 with PipelineWithTwoStages

use of com.thoughtworks.go.fixture.PipelineWithTwoStages in project gocd by gocd.

the class StageOrderTest method setUp.

@Before
public void setUp() throws Exception {
    preCondition = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    configHelper.onSetUp();
    configHelper.usingCruiseConfigDao(goConfigDao);
    dbHelper.onSetUp();
    preCondition.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) Before(org.junit.Before)

Example 12 with PipelineWithTwoStages

use of com.thoughtworks.go.fixture.PipelineWithTwoStages in project gocd by gocd.

the class PipelineScheduleServiceTest method shouldForceFirstStagePlanWhenOtherStageIsRunning.

@Test
public void shouldForceFirstStagePlanWhenOtherStageIsRunning() throws Exception {
    pipelineWithTwoStages = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    pipelineWithTwoStages.usingDbHelper(dbHelper).usingConfigHelper(configHelper).onSetUp();
    pipelineWithTwoStages.createPipelineWithFirstStagePassedAndSecondStageRunning();
    Pipeline pipeline = manualSchedule(pipelineWithTwoStages.pipelineName);
    assertThat(pipeline.getFirstStage().isActive(), is(true));
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) Test(org.junit.Test)

Example 13 with PipelineWithTwoStages

use of com.thoughtworks.go.fixture.PipelineWithTwoStages in project gocd by gocd.

the class PipelineScheduleServiceTest method shouldForceFirstStagePlan.

@Test
public void shouldForceFirstStagePlan() throws Exception {
    pipelineWithTwoStages = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    pipelineWithTwoStages.usingDbHelper(dbHelper).usingConfigHelper(configHelper).onSetUp();
    pipelineWithTwoStages.createPipelineWithFirstStagePassedAndSecondStageRunning();
    Pipeline pipeline = manualSchedule(pipelineWithTwoStages.pipelineName);
    assertThat(pipeline.getFirstStage().stageState(), is(StageState.Building));
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) Test(org.junit.Test)

Example 14 with PipelineWithTwoStages

use of com.thoughtworks.go.fixture.PipelineWithTwoStages in project gocd by gocd.

the class PropertiesServiceTest method setUp.

@Before
public void setUp() throws Exception {
    configHelper = new GoConfigFileHelper();
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) Before(org.junit.Before)

Example 15 with PipelineWithTwoStages

use of com.thoughtworks.go.fixture.PipelineWithTwoStages in project gocd by gocd.

the class RescheduleJobTest method setUp.

@Before
public void setUp() throws Exception {
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
    configHelper.addPipeline(PIPELINE_NAME, STAGE_NAME);
    stage = dbHelper.saveBuildingStage(PIPELINE_NAME, STAGE_NAME);
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) Before(org.junit.Before)

Aggregations

PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)28 Before (org.junit.Before)22 GoConfigFileHelper (com.thoughtworks.go.util.GoConfigFileHelper)10 SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)3 SchedulerFixture (com.thoughtworks.go.fixture.SchedulerFixture)2 Test (org.junit.Test)2 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)2 Cloner (com.rits.cloning.Cloner)1 AgentConfig (com.thoughtworks.go.config.AgentConfig)1 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)1 ArtifactsDiskIsFull (com.thoughtworks.go.fixture.ArtifactsDiskIsFull)1 PipelineWithMultipleStages (com.thoughtworks.go.fixture.PipelineWithMultipleStages)1 ShineDao (com.thoughtworks.go.server.dao.sparql.ShineDao)1 Username (com.thoughtworks.go.server.domain.Username)1 InMemoryEmailNotificationTopic (com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic)1 StageNotificationListener (com.thoughtworks.go.server.messaging.StageNotificationListener)1 HttpLocalizedOperationResult (com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult)1 AgentStub (com.thoughtworks.go.server.websocket.AgentStub)1 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)1 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)1