use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class ValueStreamMapPerformanceTest method setup.
@Before
public void setup() throws Exception {
configHelper = new GoConfigFileHelper();
dbHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
configHelper.onSetUp();
goConfigService.forceNotifyListeners();
u = new ScheduleTestUtil(transactionTemplate, materialRepository, dbHelper, configHelper);
graphGenerator = new GraphGenerator(configHelper, u);
}
use of com.thoughtworks.go.util.GoConfigFileHelper 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);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
repository = new SvnCommand(null, testRepo.projectRepositoryUrl());
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();
u = new ScheduleTestUtil(transactionTemplate, materialRepository, dbHelper, configHelper);
agent = new AgentStub();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class PackageDefinitionServiceIntegrationTest method setup.
@Before
public void setup() throws Exception {
cachedGoPartials.clear();
configHelper = new GoConfigFileHelper();
dbHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
configHelper.onSetUp();
goConfigService.forceNotifyListeners();
user = new Username(new CaseInsensitiveString("current"));
final PackageRepository npmRepo = new PackageRepository();
PluginConfiguration pluginConfiguration = new PluginConfiguration();
pluginConfiguration.setId("npm");
pluginConfiguration.setVersion("1");
npmRepo.setPluginConfiguration(pluginConfiguration);
repoId = "repoId";
npmRepo.setId(repoId);
npmRepo.setName(repoId);
Configuration configuration = new Configuration();
configuration.add(new ConfigurationProperty(new ConfigurationKey("PACKAGE_ID"), new ConfigurationValue("prettyjson")));
npmRepo.setConfiguration(configuration);
goConfigService.updateConfig(new UpdateConfigCommand() {
@Override
public CruiseConfig update(CruiseConfig cruiseConfig) throws Exception {
cruiseConfig.setPackageRepositories(new PackageRepositories(npmRepo));
return cruiseConfig;
}
});
UpdateConfigCommand command = goConfigService.modifyAdminPrivilegesCommand(asList(user.getUsername().toString()), new TriStateSelection(Admin.GO_SYSTEM_ADMIN, TriStateSelection.Action.add));
goConfigService.updateConfig(command);
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class AutoSchedulerIntegrationTest method setUp.
@Before
public void setUp() 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);
twoPipelineGroups.onSetUp();
serverHealthService.removeAllLogs();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class JobControllerIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao);
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
controller = new JobController(jobInstanceService, jobDetailService, goConfigService, pipelineService, restfulService, artifactService, propertiesService, stageService, localizer);
}
Aggregations