use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class PipelineSqlMapDaoIntegrationTest method setup.
@BeforeEach
public void setup() throws Exception {
dbHelper.onSetUp();
goCache.clear();
configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao);
u = new ScheduleTestUtil(transactionTemplate, materialRepository, dbHelper, configHelper);
notifier.disableUpdates();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class BuildCauseProducerServiceWithFlipModificationTest method setup.
@BeforeEach
public void setup(@TempDir Path tempDir) throws Exception {
configHelper = new GoConfigFileHelper();
dbHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao);
configHelper.onSetUp();
svnRepository = new SvnTestRepo(tempDir);
hgTestRepo = new HgTestRepo("testHgRepo", tempDir);
repository = new SvnCommand(null, svnRepository.projectRepositoryUrl());
svnMaterialConfig = svn(repository.getUrl().originalArgument(), repository.getUserName(), repository.getPassword(), repository.isCheckExternals());
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class ChangeMaterialsTest method setUp.
@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
username = new Username(new CaseInsensitiveString("gli"));
dbHelper.onSetUp();
cruiseConfig = new GoConfigFileHelper().usingCruiseConfigDao(goConfigDao);
cruiseConfig.onSetUp();
hgTestRepo = new HgTestRepo(tempDir);
SvnTestRepo svnRepo = new SvnTestRepo(tempDir);
cruiseConfig.addPipeline(PIPELINE_NAME, DEV_STAGE, svnRepo.materialConfig(), "foo");
mingle = cruiseConfig.addStageToPipeline(PIPELINE_NAME, FT_STAGE, "bar");
pipeline = dbHelper.newPipelineWithAllStagesPassed(mingle);
listener = new StubScheduleCheckCompletedListener();
topic.addListener(listener);
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class AutoSchedulerIntegrationTest method setUp.
@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
GoConfigFileHelper configFileHelper = new GoConfigFileHelper().usingCruiseConfigDao(goConfigDao);
dbHelper.onSetUp();
configFileHelper.onSetUp();
configFileHelper.usingCruiseConfigDao(goConfigDao);
configWithFreeEditionLicense = new ConfigWithFreeEditionLicense(configFileHelper);
configWithFreeEditionLicense.onSetUp();
configService.forceNotifyListeners();
twoPipelineGroups = new TwoPipelineGroups(configFileHelper, tempDir);
twoPipelineGroups.onSetUp();
serverHealthService.removeAllLogs();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class PipelineScheduleServiceTest method setup.
@BeforeEach
public void setup(@TempDir Path tempDir) throws Exception {
configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao);
configHelper.onSetUp();
testRepo = new SvnTestRepo(tempDir);
dbHelper.onSetUp();
repository = new SvnCommand(null, testRepo.projectRepositoryUrl());
mingleConfig = configHelper.addPipeline("mingle", STAGE_NAME, repository, "unit", "functional");
goConfig = configHelper.addPipeline("go", STAGE_NAME, repository, "unit");
StageConfig ftStageConfig = StageConfigMother.custom("ft", "twist");
ftStageConfig.jobConfigByConfigName(new CaseInsensitiveString("twist")).addVariable("JOB_LVL", "job value");
ftStageConfig.setVariables(env("STAGE_LVL", "stage value"));
configHelper.addStageToPipeline("go", ftStageConfig);
configHelper.addEnvironmentVariableToPipeline("go", env("PIPELINE_LVL", "pipeline value"));
configHelper.addEnvironments("uat");
EnvironmentConfig uatEnv = configHelper.currentConfig().getEnvironments().named(new CaseInsensitiveString("uat"));
uatEnv.addPipeline(new CaseInsensitiveString("go"));
uatEnv.addEnvironmentVariable("ENV_LVL", "env value");
evolveConfig = configHelper.addPipeline("evolve", STAGE_NAME, repository, "unit");
goCache.clear();
}
Aggregations