use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class SvnCommandTest method shouldRecogniseSvnAsTheSameIfURLContainsChineseCharacters.
@Test
@RunIf(value = EnhancedOSChecker.class, arguments = { DO_NOT_RUN_ON, WINDOWS })
public void shouldRecogniseSvnAsTheSameIfURLContainsChineseCharacters() throws Exception {
File working = TestFileUtil.createTempFolder("shouldRecogniseSvnAsTheSameIfURLContainsSpaces");
SvnTestRepo repo = new SvnTestRepo("a directory with 司徒空在此");
SvnMaterial material = repo.material();
assertThat(material.getUrl(), containsString("%20"));
InMemoryStreamConsumer output = new InMemoryStreamConsumer();
material.freshCheckout(output, new SubversionRevision("3"), working);
assertThat(output.getAllOutput(), containsString("Checked out revision 3"));
InMemoryStreamConsumer output2 = new InMemoryStreamConsumer();
updateMaterial(material, new SubversionRevision("4"), working, output2);
assertThat(output2.getAllOutput(), containsString("Updated to revision 4"));
}
use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class StageIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
dbHelper.onSetUp();
CONFIG_HELPER.onSetUp();
CONFIG_HELPER.usingCruiseConfigDao(goConfigDao);
CONFIG_HELPER.initializeConfigFile();
TestRepo svnTestRepo = new SvnTestRepo("testsvnrepo");
svnRepo = new SvnCommand(null, svnTestRepo.projectRepositoryUrl());
CONFIG_HELPER.addPipeline(PIPELINE_NAME, DEV_STAGE, svnRepo, "foo");
mingle = CONFIG_HELPER.addStageToPipeline(PIPELINE_NAME, FT_STAGE, "bar");
CONFIG_HELPER.addAgent(HOSTNAME, AGENT_UUID);
}
use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class PipelineWithRunOnAllJob method addToSetup.
public void addToSetup() throws Exception {
TestRepo svnTestRepo = new SvnTestRepo("testsvnrepo");
svnClient = new SvnCommand(null, svnTestRepo.projectRepositoryUrl());
MaterialConfigs materialConfigs = MaterialConfigsMother.mockMaterialConfigs(svnTestRepo.projectRepositoryUrl());
SvnMaterialConfig svnMaterialConfig = (SvnMaterialConfig) materialConfigs.first();
svnMaterialConfig.setName(new CaseInsensitiveString(DEFAULT_MATERIAL));
svnMaterialConfig.setConfigAttributes(Collections.singletonMap(ScmMaterialConfig.FOLDER, "default-folder"));
configHelper.addPipelineWithGroup(groupName, pipelineName, materialConfigs, devStage, jobsOfDevStage);
configHelper.addStageToPipeline(pipelineName, ftStage, JOB_FOR_FT_STAGE);
configHelper.setPipelineLabelTemplate(pipelineName, "label-${COUNT}");
dbHelper.onSetUp();
}
use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class PipelineWithTwoStages method addToSetup.
public void addToSetup() throws Exception {
TestRepo svnTestRepo = new SvnTestRepo("testsvnrepo");
svnClient = new SvnCommand(null, svnTestRepo.projectRepositoryUrl());
MaterialConfigs materialConfigs = MaterialConfigsMother.mockMaterialConfigs(svnTestRepo.projectRepositoryUrl());
SvnMaterialConfig svnMaterialConfig = (SvnMaterialConfig) materialConfigs.first();
svnMaterialConfig.setName(new CaseInsensitiveString(DEFAULT_MATERIAL));
svnMaterialConfig.setConfigAttributes(Collections.singletonMap(ScmMaterialConfig.FOLDER, "default-folder"));
configHelper.addPipelineWithGroup(groupName, pipelineName, materialConfigs, devStage, jobsOfDevStage);
configHelper.addStageToPipeline(pipelineName, ftStage, JOB_FOR_FT_STAGE);
configHelper.setPipelineLabelTemplate(pipelineName, "label-${COUNT}");
dbHelper.onSetUp();
}
use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class HgMultipleMaterialsTest method createRepo.
@Before
public void createRepo() throws IOException {
repo = new HgTestRepo();
svnRepo = new SvnTestRepo();
pipelineDir = TestFileUtil.createTempFolder("working-dir-" + UUID.randomUUID());
toClean.add(pipelineDir);
}
Aggregations