Search in sources :

Example 1 with PipelineWithMultipleStages

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

the class CachedCurrentActivityServiceIntegrationTest method setup.

@Before
public void setup() throws Exception {
    configFileHelper.usingCruiseConfigDao(goConfigDao);
    configFileHelper.onSetUp();
    fixture = new PipelineWithMultipleStages(3, materialRepository, transactionTemplate);
    fixture.usingConfigHelper(configFileHelper).usingDbHelper(dbHelper).onSetUp();
}
Also used : PipelineWithMultipleStages(com.thoughtworks.go.fixture.PipelineWithMultipleStages) Before(org.junit.Before)

Example 2 with PipelineWithMultipleStages

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

the class StageServiceIntegrationTest method shouldReturnTrueIfAnyStageIsBuildingInAGivenPipeline.

@Test
public void shouldReturnTrueIfAnyStageIsBuildingInAGivenPipeline() throws Exception {
    fixture = new PipelineWithMultipleStages(4, materialRepository, transactionTemplate);
    fixture.usingConfigHelper(configFileHelper).usingDbHelper(dbHelper).onSetUp();
    Pipeline pipeline = fixture.createPipelineWithFirstStageAssigned();
    assertThat(stageService.isAnyStageActiveForPipeline(fixture.pipelineName, pipeline.getCounter()), Is.is(true));
}
Also used : PipelineWithMultipleStages(com.thoughtworks.go.fixture.PipelineWithMultipleStages) Test(org.junit.Test)

Example 3 with PipelineWithMultipleStages

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

the class StageControllerIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    fixture = new PipelineWithMultipleStages(3, materialRepository, transactionTemplate);
    this.configHelper = new GoConfigFileHelper();
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
    request = new MockHttpServletRequest();
    response = new MockHttpServletResponse();
    request.addHeader("Confirm", "true");
}
Also used : MockHttpServletRequest(org.springframework.mock.web.MockHttpServletRequest) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) PipelineWithMultipleStages(com.thoughtworks.go.fixture.PipelineWithMultipleStages) MockHttpServletResponse(org.springframework.mock.web.MockHttpServletResponse) Before(org.junit.Before)

Example 4 with PipelineWithMultipleStages

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

the class SchedulingCheckerServiceIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    configFileHelper.onSetUp();
    configFileHelper.usingCruiseConfigDao(goConfigDao);
    pipelineFixture = new PipelineWithMultipleStages(2, materialRepository, transactionTemplate);
    pipelineFixture.usingConfigHelper(configFileHelper).usingDbHelper(dbHelper).onSetUp();
    pipelineFixture.configStageAsManualApprovalWithApprovedUsers(pipelineFixture.ftStage, APPROVED_USER);
    configFileHelper.addSecurityWithNonExistantPasswordFile();
    configFileHelper.addSecurityWithAdminConfig();
    dbHelper.onSetUp();
    diskSpaceSimulator = new DiskSpaceSimulator();
}
Also used : PipelineWithMultipleStages(com.thoughtworks.go.fixture.PipelineWithMultipleStages) Before(org.junit.Before)

Example 5 with PipelineWithMultipleStages

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

the class PipelineHistoryControllerIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    fixture = new PipelineWithMultipleStages(3, materialRepository, transactionTemplate);
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    dbHelper.onSetUp();
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
    goConfigService.forceNotifyListeners();
    request = new MockHttpServletRequest();
    response = new MockHttpServletResponse();
}
Also used : MockHttpServletRequest(org.springframework.mock.web.MockHttpServletRequest) PipelineWithMultipleStages(com.thoughtworks.go.fixture.PipelineWithMultipleStages) MockHttpServletResponse(org.springframework.mock.web.MockHttpServletResponse) Before(org.junit.Before)

Aggregations

PipelineWithMultipleStages (com.thoughtworks.go.fixture.PipelineWithMultipleStages)9 Before (org.junit.Before)6 Test (org.junit.Test)3 GoConfigFileHelper (com.thoughtworks.go.util.GoConfigFileHelper)2 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)2 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)2 ArtifactsDiskIsFull (com.thoughtworks.go.fixture.ArtifactsDiskIsFull)1 PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)1 Date (java.util.Date)1