Search in sources :

Example 6 with PipelineWithTwoStages

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

the class JobInstanceStatusMonitorTest method setUp.

@Before
public void setUp() throws Exception {
    configHelper = new GoConfigFileHelper().usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    dbHelper.onSetUp();
    fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
    repository = new SvnCommand(null, testRepo.projectRepositoryUrl());
    PipelineConfig evolveConfig = configHelper.addPipeline("evolve", STAGE_NAME, repository, "unit");
    configHelper.addPipeline("anotherPipeline", STAGE_NAME, repository, "anotherTest");
    configHelper.addPipeline("thirdPipeline", STAGE_NAME, repository, "yetAnotherTest");
    goConfigService.forceNotifyListeners();
    goCache.clear();
    agent = new AgentStub();
}
Also used : PipelineConfig(com.thoughtworks.go.config.PipelineConfig) PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper)

Example 7 with PipelineWithTwoStages

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

the class UpdateAgentStatusTest method setUp.

@Before
public void setUp() throws Exception {
    dbHelper.onSetUp();
    configHelper.onSetUp();
    configHelper.usingCruiseConfigDao(goConfigDao);
    preCondition = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    preCondition.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
    agentService.clearAll();
    agentService.requestRegistration(new Username("bob"), AgentRuntimeInfo.fromServer(new AgentConfig(agentId, "CCEDev01", "10.81.2.1"), false, "/var/lib", 0L, "linux", false));
    agentService.approve(agentId);
}
Also used : AgentConfig(com.thoughtworks.go.config.AgentConfig) PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) Username(com.thoughtworks.go.server.domain.Username) Before(org.junit.Before)

Example 8 with PipelineWithTwoStages

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

the class ScheduleServiceSecurityTest method setUp.

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

Example 9 with PipelineWithTwoStages

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

the class ScheduleServiceStageTriggerTest 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();
    schedulerFixture = new SchedulerFixture(dbHelper, stageDao, scheduleService);
}
Also used : SchedulerFixture(com.thoughtworks.go.fixture.SchedulerFixture) PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) Before(org.junit.Before)

Example 10 with PipelineWithTwoStages

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

the class StageNotificationServiceIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    stageService = mock(StageService.class);
    shineDao = mock(ShineDao.class);
    stageNotificationService = new StageNotificationService(pipelineService, userService, inMemoryEmailNotificationTopic, systemEnvironment, stageService, serverConfigService, shineDao);
    stageNotificationListener = new StageNotificationListener(stageNotificationService, goConfigService, stageResultTopic);
    dbHelper.onSetUp();
    configFileHelper.onSetUp();
    configFileHelper.usingEmptyConfigFileWithLicenseAllowsUnlimitedAgents();
    configFileHelper.usingCruiseConfigDao(goConfigDao);
    pipelineFixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    pipelineFixture.usingConfigHelper(configFileHelper).usingDbHelper(dbHelper).onSetUp();
    configFileHelper.enableSecurity();
    inMemoryEmailNotificationTopic = new InMemoryEmailNotificationTopic();
    stageNotificationService.setEmailNotificationTopic(inMemoryEmailNotificationTopic);
}
Also used : ShineDao(com.thoughtworks.go.server.dao.sparql.ShineDao) PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) InMemoryEmailNotificationTopic(com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic) StageNotificationListener(com.thoughtworks.go.server.messaging.StageNotificationListener) 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