Search in sources :

Example 1 with TestRepo

use of com.thoughtworks.go.helper.TestRepo 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);
}
Also used : SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) TestRepo(com.thoughtworks.go.helper.TestRepo) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) Before(org.junit.Before)

Example 2 with TestRepo

use of com.thoughtworks.go.helper.TestRepo 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();
}
Also used : MaterialConfigs(com.thoughtworks.go.config.materials.MaterialConfigs) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) TestRepo(com.thoughtworks.go.helper.TestRepo) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) SvnMaterialConfig(com.thoughtworks.go.config.materials.svn.SvnMaterialConfig)

Example 3 with TestRepo

use of com.thoughtworks.go.helper.TestRepo 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();
}
Also used : MaterialConfigs(com.thoughtworks.go.config.materials.MaterialConfigs) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) TestRepo(com.thoughtworks.go.helper.TestRepo) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) SvnMaterialConfig(com.thoughtworks.go.config.materials.svn.SvnMaterialConfig)

Aggregations

SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)3 SvnTestRepo (com.thoughtworks.go.helper.SvnTestRepo)3 TestRepo (com.thoughtworks.go.helper.TestRepo)3 MaterialConfigs (com.thoughtworks.go.config.materials.MaterialConfigs)2 SvnMaterialConfig (com.thoughtworks.go.config.materials.svn.SvnMaterialConfig)2 Before (org.junit.Before)1