use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class PropertiesControllerTest method setUp.
@Before
public void setUp() throws Exception {
configHelper = new GoConfigFileHelper();
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
controller = new PropertiesController(propertiesService, restfulService, pipelineService, systemEnvironment);
response = new MockHttpServletResponse();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class ArtifactsControllerIntegrationTest method setup.
@Before
public void setup() throws Exception {
configHelper = new GoConfigFileHelper();
configHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao);
pipelineName = "pipeline-" + UUID.randomUUID().toString();
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
dbHelper.onSetUp();
pipeline = dbHelper.saveTestPipeline(pipelineName, "stage", "build");
dbHelper.saveBuildingStage(pipeline.getStages().byName("stage"));
configHelper.addPipeline(pipelineName, "stage", "build");
stage = pipeline.getStages().byName("stage");
job = stage.getJobInstances().getByName("build");
buildId = job.getId();
JobIdentifier jobId = new JobIdentifier(pipeline.getName(), -2, pipeline.getLabel(), stage.getName(), String.valueOf(stage.getCounter()), job.getName(), job.getId());
artifactsRoot = artifactService.findArtifact(jobId, "");
consoleLogFile = consoleService.consoleLogFile(jobId);
deleteDirectory(consoleLogFile.getParentFile());
deleteDirectory(artifactsRoot);
artifactsRoot.mkdirs();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class BuildCauseProducerServiceWithFlipModificationTest method setup.
@Before
public void setup() throws Exception {
configHelper = new GoConfigFileHelper();
dbHelper.onSetUp();
configHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
svnRepository = new SvnTestRepo("testSvnRepo");
hgTestRepo = new HgTestRepo("testHgRepo");
repository = new SvnCommand(null, svnRepository.projectRepositoryUrl());
svnMaterialConfig = new SvnMaterialConfig(repository.getUrl().forCommandline(), repository.getUserName(), repository.getPassword(), repository.isCheckExternals());
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class ChangeMaterialsTest method setUp.
@Before
public void setUp() throws Exception {
username = new Username(new CaseInsensitiveString("gli"));
dbHelper.onSetUp();
cruiseConfig = new GoConfigFileHelper().usingCruiseConfigDao(goConfigDao);
cruiseConfig.onSetUp();
cruiseConfig.initializeConfigFile();
hgTestRepo = new HgTestRepo();
SvnTestRepo svnRepo = new SvnTestRepo();
cruiseConfig.addPipeline(PIPELINE_NAME, DEV_STAGE, svnRepo.materialConfig(), "foo");
mingle = cruiseConfig.addStageToPipeline(PIPELINE_NAME, FT_STAGE, "bar");
pipeline = dbHelper.newPipelineWithAllStagesPassed(mingle);
listener = new StubScheduleCheckCompletedListener();
topic.addListener(listener);
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class LdapAuthenticationTest method setUp.
@Before
public void setUp() throws Exception {
configFileHelper = new GoConfigFileHelper();
configFileHelper.usingCruiseConfigDao(goConfigDao);
configFileHelper.initializeConfigFile();
configFileHelper.addLdapSecurity(LDAP_URL, MANAGER_DN, MANAGER_PASSWORD, SEARCH_BASE, SEARCH_FILTER);
ldapServer = new InMemoryLdapServerForTests(BASE_DN, MANAGER_DN, MANAGER_PASSWORD).start(PORT);
ldapServer.addOrganizationalUnit("Principal", "ou=Principal," + BASE_DN);
ldapServer.addOrganizationalUnit("Company", "ou=Company,ou=Principal," + BASE_DN);
employeesOrgUnit = ldapServer.addOrganizationalUnit("Employees", "ou=Employees,ou=Company,ou=Principal," + BASE_DN);
}
Aggregations