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();
}
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);
}
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();
}
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);
}
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);
}
Aggregations