Search in sources :

Example 31 with GoConfigFileHelper

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

the class InvalidConfigMessageRemoverIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    configFile = TestFileUtil.createTempFileInSubfolder("cruise-config.xml");
    GoConfigFileHelper.clearConfigVersions();
    configHelper = new GoConfigFileHelper();
    configHelper.onSetUp();
    SystemEnvironment systemEnvironment = new SystemEnvironment();
    systemEnvironment.setProperty(SystemEnvironment.CONFIG_FILE_PROPERTY, configFile.getAbsolutePath());
    new ConfigRepository(systemEnvironment).initialize();
    serverHealthService.removeAllLogs();
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) ConfigRepository(com.thoughtworks.go.service.ConfigRepository) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) Before(org.junit.Before)

Example 32 with GoConfigFileHelper

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

the class PipelineScheduleQueueIntegrationTest method setup.

@Before
public void setup() throws Exception {
    configFileEditor = new GoConfigFileHelper();
    configFileEditor.onSetUp();
    dbHelper.onSetUp();
    configFileEditor.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
    fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate);
    fixture.usingDbHelper(dbHelper).usingConfigHelper(configFileEditor).onSetUp();
    newCause = BuildCause.createWithEmptyModifications();
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) Before(org.junit.Before)

Example 33 with GoConfigFileHelper

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

the class ConfigSaveDeadlockDetectionIntegrationTest method setup.

@Before
public void setup() throws Exception {
    configHelper = new GoConfigFileHelper(ConfigFileFixture.XML_WITH_SINGLE_ENVIRONMENT);
    configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
    configHelper.onSetUp();
    goConfigService.forceNotifyListeners();
}
Also used : GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) Before(org.junit.Before)

Example 34 with GoConfigFileHelper

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

the class ChangesetServiceIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    dbHelper.onSetUp();
    configHelper = new GoConfigFileHelper(goConfigDao);
    configHelper.onSetUp();
    git = MaterialsMother.gitMaterial("http://google.com", null, "master");
    git.setFolder("git");
    hg = MaterialsMother.hgMaterial();
    hg.setFolder("hg");
    svn = MaterialsMother.svnMaterial("http://google.com/svn");
    svn.setFolder("svn");
    pipelineConfig = configHelper.addPipeline("foo-bar", "stage", new MaterialConfigs(hg.config()), "build");
    pipelineConfigWithTwoMaterials = configHelper.addPipeline("foo", "stage", new MaterialConfigs(git.config(), hg.config()), "build");
    pipelineConfigWithSvn = configHelper.addPipeline("bar", "stage", new MaterialConfigs(svn.config()), "build");
    notifier.disableUpdates();
}
Also used : MaterialConfigs(com.thoughtworks.go.config.materials.MaterialConfigs) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) Before(org.junit.Before)

Example 35 with GoConfigFileHelper

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

the class InvalidConfigurationTest method useConfig.

private void useConfig(String configContents) throws Exception {
    GoConfigFileHelper goConfigFileHelper = new GoConfigFileHelper(configContents);
    goConfigFileHelper.initializeConfigFile();
}
Also used : GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper)

Aggregations

GoConfigFileHelper (com.thoughtworks.go.util.GoConfigFileHelper)35 Before (org.junit.Before)31 PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)10 SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)5 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)4 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)3 SvnTestRepo (com.thoughtworks.go.helper.SvnTestRepo)3 Username (com.thoughtworks.go.server.domain.Username)3 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)3 PipelineWithMultipleStages (com.thoughtworks.go.fixture.PipelineWithMultipleStages)2 HgTestRepo (com.thoughtworks.go.helper.HgTestRepo)2 TriStateSelection (com.thoughtworks.go.presentation.TriStateSelection)2 GoCipher (com.thoughtworks.go.security.GoCipher)2 AdminUser (com.thoughtworks.go.config.AdminUser)1 Authorization (com.thoughtworks.go.config.Authorization)1 CruiseConfig (com.thoughtworks.go.config.CruiseConfig)1 EnvironmentConfig (com.thoughtworks.go.config.EnvironmentConfig)1 LdapConfig (com.thoughtworks.go.config.LdapConfig)1 MingleConfig (com.thoughtworks.go.config.MingleConfig)1 PasswordFileConfig (com.thoughtworks.go.config.PasswordFileConfig)1