use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class PipelineConfigServiceIntegrationTest 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"));
pipelineConfig = GoConfigMother.createPipelineConfigWithMaterialConfig(UUID.randomUUID().toString(), new GitMaterialConfig("FOO"));
goConfigService.addPipeline(pipelineConfig, groupName);
repoConfig1 = new ConfigRepoConfig(MaterialConfigsMother.gitMaterialConfig("url"), XmlPartialConfigProvider.providerName);
repoConfig2 = new ConfigRepoConfig(MaterialConfigsMother.gitMaterialConfig("url2"), XmlPartialConfigProvider.providerName);
goConfigService.updateConfig(new UpdateConfigCommand() {
@Override
public CruiseConfig update(CruiseConfig cruiseConfig) throws Exception {
cruiseConfig.getConfigRepos().add(repoConfig1);
cruiseConfig.getConfigRepos().add(repoConfig2);
return cruiseConfig;
}
});
GoCipher goCipher = new GoCipher();
goConfigService.updateServerConfig(new MailHost(goCipher), new LdapConfig(goCipher), new PasswordFileConfig("path"), false, goConfigService.configFileMd5(), "artifacts", null, null, "0", null, null, "foo");
UpdateConfigCommand command = goConfigService.modifyAdminPrivilegesCommand(asList(user.getUsername().toString()), new TriStateSelection(Admin.GO_SYSTEM_ADMIN, TriStateSelection.Action.add));
goConfigService.updateConfig(command);
remoteDownstreamPipelineName = "remote-downstream";
partialConfig = PartialConfigMother.pipelineWithDependencyMaterial(remoteDownstreamPipelineName, pipelineConfig, new RepoConfigOrigin(repoConfig1, "repo1_r1"));
goPartialConfig.onSuccessPartialConfig(repoConfig1, partialConfig);
PartialConfig partialConfigFromRepo2 = PartialConfigMother.withPipeline("independent-pipeline", new RepoConfigOrigin(repoConfig2, "repo2_r1"));
goPartialConfig.onSuccessPartialConfig(repoConfig2, partialConfigFromRepo2);
result = new HttpLocalizedOperationResult();
headCommitBeforeUpdate = configRepository.getCurrentRevCommit().name();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class GoPropertiesTestTest method setUp.
@Before
public void setUp() throws Exception {
configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(cruiseConfigDao);
configHelper.onSetUp();
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
configHelper.addAgent(HOSTNAME, AGENT_UUID);
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class GoConfigServiceIntegrationTest method setup.
@Before
public void setup() throws Exception {
configHelper = new GoConfigFileHelper();
dbHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
configHelper.onSetUp();
goConfigService.forceNotifyListeners();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class ArtifactsDirChangeTest method setUp.
@Before
public void setUp() throws Exception {
configHelper = new GoConfigFileHelper().usingCruiseConfigDao(configDao);
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
serverHealthService.removeAllLogs();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class LdapAuthenticationProviderTest method setUp.
@Before
public void setUp() throws Exception {
configFileHelper = new GoConfigFileHelper();
configFileHelper.usingCruiseConfigDao(goConfigDao);
configFileHelper.initializeConfigFile();
}
Aggregations