use of com.thoughtworks.go.domain.materials.svn.SvnCommand in project gocd by gocd.
the class TwoPipelineGroups method onSetUp.
public void onSetUp() throws Exception {
this.isSetup = true;
configHelper.initializeConfigFile();
svnTestRepo = new SvnTestRepo(temporaryFolder);
SvnCommand svnCommand = new SvnCommand(null, svnTestRepo.projectRepositoryUrl());
configHelper.addPipelineWithGroup("group1", "pipeline_" + UUID.randomUUID(), svnCommand, "defaultStage", "defaultJob");
configHelper.addPipelineWithGroup("group2", "pipeline_" + UUID.randomUUID(), svnCommand, "defaultStage", "defaultJob");
}
use of com.thoughtworks.go.domain.materials.svn.SvnCommand in project gocd by gocd.
the class SvnPostCommitHookImplementerTest method shouldReturnEmptySvnCommand.
@Test
public void shouldReturnEmptySvnCommand() {
final SvnCommand svnCommand = implementer.getEmptySvnCommand();
assertThat(svnCommand instanceof SvnCommand, is(true));
assertThat(svnCommand.getUrl().toString(), is("."));
}
use of com.thoughtworks.go.domain.materials.svn.SvnCommand in project gocd by gocd.
the class JobInstanceStatusMonitorTest method setUp.
@Before
public void setUp() throws Exception {
configHelper = new GoConfigFileHelper().usingCruiseConfigDao(goConfigDao);
configHelper.onSetUp();
dbHelper.onSetUp();
fixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
repository = new SvnCommand(null, testRepo.projectRepositoryUrl());
PipelineConfig evolveConfig = configHelper.addPipeline("evolve", STAGE_NAME, repository, "unit");
configHelper.addPipeline("anotherPipeline", STAGE_NAME, repository, "anotherTest");
configHelper.addPipeline("thirdPipeline", STAGE_NAME, repository, "yetAnotherTest");
goConfigService.forceNotifyListeners();
goCache.clear();
agent = new AgentStub();
}
use of com.thoughtworks.go.domain.materials.svn.SvnCommand in project gocd by gocd.
the class BuildAssignmentTest method materialRevisions.
private MaterialRevisions materialRevisions() throws IOException {
MaterialRevision svnRevision = new MaterialRevision(this.svnMaterial, ModificationsMother.oneModifiedFile(svnRepoFixture.getHeadRevision(svnRepoFixture.getEnd2EndRepoUrl())));
SvnMaterial svnMaterialForExternal = createSvnMaterialWithMock(new SvnCommand(null, svnRepoFixture.getExternalRepoUrl()));
String folder = this.svnMaterial.getFolder() == null ? "external" : this.svnMaterial.getFolder() + "/" + "external";
svnMaterialForExternal.setFolder(folder);
MaterialRevision svnExternalRevision = new MaterialRevision(svnMaterialForExternal, ModificationsMother.oneModifiedFile(svnRepoFixture.getHeadRevision(svnRepoFixture.getExternalRepoUrl())));
MaterialRevision hgRevision = new MaterialRevision(hgMaterial, ModificationsMother.oneModifiedFile(hgTestRepo.latestModifications().get(0).getRevision()));
MaterialRevision dependencyRevision1 = ModificationsMother.dependencyMaterialRevision(0, dependencyMaterial.getPipelineName() + "-label", 1, dependencyMaterial, new Date());
MaterialRevision dependencyRevisionWithName = ModificationsMother.dependencyMaterialRevision(0, dependencyMaterialWithName.getPipelineName() + "-label", 1, dependencyMaterialWithName, new Date());
return new MaterialRevisions(svnRevision, svnExternalRevision, hgRevision, dependencyRevision1, dependencyRevisionWithName);
}
use of com.thoughtworks.go.domain.materials.svn.SvnCommand in project gocd by gocd.
the class BuildAssignmentTest method setUp.
@Before
public void setUp() throws IOException {
initMocks(this);
dir = temporaryFolder.newFolder("someFolder");
svnRepoFixture = new SvnRepoFixture("../common/src/test/resources/data/svnrepo", temporaryFolder);
svnRepoFixture.createRepository();
command = new SvnCommand(null, svnRepoFixture.getEnd2EndRepoUrl());
svnMaterial = createSvnMaterialWithMock(command);
dependencyMaterial = new DependencyMaterial(new CaseInsensitiveString("upstream1"), new CaseInsensitiveString(STAGE_NAME));
dependencyMaterialWithName = new DependencyMaterial(new CaseInsensitiveString("upstream2"), new CaseInsensitiveString(STAGE_NAME));
dependencyMaterialWithName.setName(new CaseInsensitiveString("dependency_material_name"));
setupHgRepo();
}
Aggregations