Search in sources :

Example 36 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, temporaryFolder);
    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 37 with GoConfigFileHelper

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, temporaryFolder);
    fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
    serverHealthService.removeAllLogs();
}
Also used : PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) Before(org.junit.Before)

Example 38 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 {
    File tempFolder = temporaryFolder.newFolder();
    configFile = new File(tempFolder, "cruise-config.xml");
    configFile.createNewFile();
    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) File(java.io.File) Before(org.junit.Before)

Example 39 with GoConfigFileHelper

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

the class CachedGoConfigIntegrationTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    configHelper = new GoConfigFileHelper(DEFAULT_XML_WITH_2_AGENTS);
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    externalConfigRepo = TempDirUtils.createTempDirectoryIn(temporaryFolder, "config_repo").toFile();
    latestModification = setupExternalConfigRepo(externalConfigRepo);
    configHelper.addConfigRepo(createConfigRepoWithDefaultRules(git(externalConfigRepo.getAbsolutePath()), XmlPartialConfigProvider.providerName, "gocd-id"));
    goConfigService.forceNotifyListeners();
    configRepo = configWatchList.getCurrentConfigRepos().get(0);
    cachedGoPartials.clear();
    configHelper.addEnvironments("some_environment");
    magicalGoConfigXmlLoader = new MagicalGoConfigXmlLoader(configCache, registry);
}
Also used : GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 40 with GoConfigFileHelper

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

the class FullConfigSaveFlowTestBase method setUp.

@BeforeEach
public void setUp() throws Exception {
    configHelper = new GoConfigFileHelper(goConfigDao);
    configHelper.onSetUp();
    xml = goConfigMigration.upgradeIfNecessary(IOUtils.toString(getClass().getResource("/data/pluggable_artifacts_with_params.xml"), UTF_8));
    loader = new MagicalGoConfigXmlLoader(configCache, registry);
    setupMetadataForPlugin();
}
Also used : 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