Search in sources :

Example 1 with SvnCommand

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");
}
Also used : SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand)

Example 2 with SvnCommand

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("."));
}
Also used : SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) Test(org.junit.Test)

Example 3 with SvnCommand

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();
}
Also used : PipelineConfig(com.thoughtworks.go.config.PipelineConfig) PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper)

Example 4 with SvnCommand

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);
}
Also used : SvnMaterial(com.thoughtworks.go.config.materials.svn.SvnMaterial) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString)

Example 5 with SvnCommand

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();
}
Also used : SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) DependencyMaterial(com.thoughtworks.go.config.materials.dependency.DependencyMaterial) SvnRepoFixture(com.thoughtworks.go.utils.SvnRepoFixture) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) Before(org.junit.Before)

Aggregations

SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)27 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)6 SvnTestRepo (com.thoughtworks.go.helper.SvnTestRepo)6 Before (org.junit.Before)6 SvnMaterial (com.thoughtworks.go.config.materials.svn.SvnMaterial)5 GoConfigFileHelper (com.thoughtworks.go.util.GoConfigFileHelper)5 MaterialConfigs (com.thoughtworks.go.config.materials.MaterialConfigs)4 SvnMaterialConfig (com.thoughtworks.go.config.materials.svn.SvnMaterialConfig)4 Subversion (com.thoughtworks.go.domain.materials.svn.Subversion)4 Test (org.junit.Test)4 DependencyMaterial (com.thoughtworks.go.config.materials.dependency.DependencyMaterial)3 PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)3 TestRepo (com.thoughtworks.go.helper.TestRepo)3 EnvironmentVariableContext (com.thoughtworks.go.util.command.EnvironmentVariableContext)3 SvnRepoFixture (com.thoughtworks.go.utils.SvnRepoFixture)3 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)2 BuildCause (com.thoughtworks.go.domain.buildcause.BuildCause)2 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)2 File (java.io.File)2 Date (java.util.Date)2