use of com.thoughtworks.go.helper.SvnTestRepo 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.helper.SvnTestRepo in project gocd by gocd.
the class SvnCommandTest method shouldRecogniseSvnAsTheSameIfURLUsesFileProtocol.
@Test
@RunIf(value = EnhancedOSChecker.class, arguments = { DO_NOT_RUN_ON, WINDOWS })
public void shouldRecogniseSvnAsTheSameIfURLUsesFileProtocol() throws Exception {
SvnTestRepo repo = new SvnTestRepo("svnRepo");
File working = TestFileUtil.createTempFolder("someDir");
SvnMaterial material = repo.material();
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 SvnCommandTest method shouldRecogniseSvnAsTheSameIfURLContainsSpaces.
@Test
@RunIf(value = EnhancedOSChecker.class, arguments = { DO_NOT_RUN_ON, WINDOWS })
public void shouldRecogniseSvnAsTheSameIfURLContainsSpaces() throws Exception {
File working = TestFileUtil.createTempFolder("shouldRecogniseSvnAsTheSameIfURLContainsSpaces");
SvnTestRepo repo = new SvnTestRepo("a directory with spaces");
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();
material.updateTo(output2, working, new RevisionContext(new SubversionRevision("4")), new TestSubprocessExecutionContext());
assertThat(output2.getAllOutput(), containsString("Updated to revision 4"));
}
use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class MixedMultipleMaterialsTest method createRepo.
@Before
public void createRepo() throws IOException {
svnRepo = new SvnTestRepo();
hgRepo = new HgTestRepo();
gitRepo = new GitTestRepo();
pipelineDir = TestFileUtil.createTempFolder("working-dir-" + UUID.randomUUID());
}
use of com.thoughtworks.go.helper.SvnTestRepo in project gocd by gocd.
the class SvnCommandTest method setup.
@Before
public void setup() throws IOException {
testRepo = new SvnTestRepo();
svnRepositoryUrl = testRepo.projectRepositoryUrl();
subversion = new SvnCommand(null, svnRepositoryUrl, "user", "pass", false);
outputStreamConsumer = inMemoryConsumer();
checkoutFolder = TestFileUtil.createUniqueTempFile("workingcopy" + System.currentTimeMillis());
}
Aggregations