use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class InvalidConfigMessageRemoverIntegrationTest method setUp.
@BeforeEach
public void setUp(@TempDir File tempFolder) throws Exception {
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();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class AgentAssignmentTest method setUp.
@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
configHelper = new GoConfigFileHelper();
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, tempDir);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
agentAssignment.clear();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class JobControllerIntegrationTest method setUp.
@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao);
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, tempDir);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
controller = new JobController(jobInstanceService, agentService, jobInstanceDao, goConfigService, pipelineService, restfulService, artifactService, stageService, jobAgentMetadataDao, systemEnvironment, securityService);
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class PipelineStateDaoIntegrationTest method setup.
@BeforeEach
public void setup() throws Exception {
dbHelper.onSetUp();
goCache.clear();
GoConfigFileHelper configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao);
notifier.disableUpdates();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class GoDashboardCurrentStateLoaderIntegrationTest method setUp.
@BeforeEach
public void setUp(@TempDir File configDir) throws Exception {
dbHelper.onSetUp();
String absolutePath = new File(configDir, "cruise-config.xml").getAbsolutePath();
systemEnvironment.setProperty(SystemEnvironment.CONFIG_FILE_PROPERTY, absolutePath);
configHelper = new GoConfigFileHelper(DEFAULT_XML_WITH_2_AGENTS);
configHelper.usingCruiseConfigDao(goConfigDao);
configHelper.onSetUp();
goConfigService.forceNotifyListeners();
goDashboardCurrentStateLoader.reset();
}
Aggregations