Search in sources :

Example 61 with GoConfigFileHelper

use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.

the class RestfulServiceTest method setUp.

@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
    fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, tempDir);
    configHelper = new GoConfigFileHelper().usingCruiseConfigDao(cruiseConfigDao);
    configHelper.onSetUp();
    dbHelper.onSetUp();
    fixture.usingThreeJobs();
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 62 with GoConfigFileHelper

use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.

the class SecurityServiceIntegrationTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    configHelper = new GoConfigFileHelper();
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    configHelper.addPipelineWithGroup(GROUP_NAME, PIPELINE_NAME, STAGE_NAME, JOB_NAME);
    configHelper.addSecurityWithAdminConfig();
    dbHelper.onSetUp();
}
Also used : GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 63 with GoConfigFileHelper

use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.

the class BuilderFactoryIntegrationTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    configHelper = new GoConfigFileHelper(goConfigDao);
    configHelper.onSetUp();
    goConfigService.forceNotifyListeners();
    configHelper.addPipeline("up42", "up42_stage", "up42_job");
    goConfigService.forceNotifyListeners();
}
Also used : GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 64 with GoConfigFileHelper

use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.

the class ScheduleServiceRunOnAllAgentIntegrationTest method setup.

@BeforeEach
public void setup() throws Exception {
    CONFIG_HELPER = new GoConfigFileHelper();
    dbHelper.onSetUp();
    CONFIG_HELPER.usingCruiseConfigDao(goConfigDao);
    CONFIG_HELPER.onSetUp();
    repository = new SvnCommand(null, testRepo.projectRepositoryUrl());
    goConfigService.forceNotifyListeners();
    agentAssignment.clear();
    goCache.clear();
    CONFIG_HELPER.addPipeline("blahPipeline", "blahStage", MaterialConfigsMother.hgMaterialConfig(UUID.randomUUID().toString()), "job1", "job2");
    CONFIG_HELPER.makeJobRunOnAllAgents("blahPipeline", "blahStage", "job2");
    notifier.disableUpdates();
}
Also used : SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

GoConfigFileHelper (com.thoughtworks.go.util.GoConfigFileHelper)64 BeforeEach (org.junit.jupiter.api.BeforeEach)36 Before (org.junit.Before)23 PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)16 SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)8 Username (com.thoughtworks.go.server.domain.Username)6 SvnTestRepo (com.thoughtworks.go.helper.SvnTestRepo)5 File (java.io.File)5 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)5 HgTestRepo (com.thoughtworks.go.helper.HgTestRepo)4 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)4 PipelineWithMultipleStages (com.thoughtworks.go.fixture.PipelineWithMultipleStages)3 TriStateSelection (com.thoughtworks.go.presentation.TriStateSelection)3 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)2 ConfigRepoConfig (com.thoughtworks.go.config.remote.ConfigRepoConfig)2 ConfigWithFreeEditionLicense (com.thoughtworks.go.fixture.ConfigWithFreeEditionLicense)2 TwoPipelineGroups (com.thoughtworks.go.fixture.TwoPipelineGroups)2 StubScheduleCheckCompletedListener (com.thoughtworks.go.server.messaging.StubScheduleCheckCompletedListener)2 ScheduleTestUtil (com.thoughtworks.go.server.service.ScheduleTestUtil)2 ConfigRepository (com.thoughtworks.go.service.ConfigRepository)2