Search in sources :

Example 1 with HgTestRepo

use of com.thoughtworks.go.helper.HgTestRepo in project gocd by gocd.

the class BuildAssignmentTest method setupHgRepo.

private void setupHgRepo() throws IOException {
    hgTestRepo = new HgTestRepo("hgTestRepo1", temporaryFolder);
    hgMaterial = MaterialsMother.hgMaterial(hgTestRepo.projectRepositoryUrl(), "hg_Dir");
}
Also used : HgTestRepo(com.thoughtworks.go.helper.HgTestRepo)

Example 2 with HgTestRepo

use of com.thoughtworks.go.helper.HgTestRepo in project gocd by gocd.

the class BuildCauseProducerServiceIntegrationHgTest method setup.

@Before
public void setup() throws Exception {
    dbHelper.onSetUp();
    configHelper.onSetUp();
    configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
    hgTestRepo = new HgTestRepo("hgTestRepo1", temporaryFolder);
    hgMaterial = MaterialsMother.hgMaterial(hgTestRepo.projectRepositoryUrl());
    hgMaterial.setFilter(new Filter(new IgnoredFiles("helper/**/*.*")));
    workingFolder = temporaryFolder.newFolder("workingFolder");
    outputStreamConsumer = inMemoryConsumer();
    mingleConfig = configHelper.addPipeline("cruise", STAGE_NAME, this.hgMaterial.config(), "unit", "functional");
}
Also used : Filter(com.thoughtworks.go.config.materials.Filter) IgnoredFiles(com.thoughtworks.go.config.materials.IgnoredFiles) HgTestRepo(com.thoughtworks.go.helper.HgTestRepo) Before(org.junit.Before)

Example 3 with HgTestRepo

use of com.thoughtworks.go.helper.HgTestRepo in project gocd by gocd.

the class BuildCauseProducerServiceWithFlipModificationTest method setup.

@Before
public void setup() throws Exception {
    configHelper = new GoConfigFileHelper();
    dbHelper.onSetUp();
    configHelper.onSetUp();
    configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
    svnRepository = new SvnTestRepo(temporaryFolder);
    hgTestRepo = new HgTestRepo("testHgRepo", temporaryFolder);
    repository = new SvnCommand(null, svnRepository.projectRepositoryUrl());
    svnMaterialConfig = new SvnMaterialConfig(repository.getUrl().forCommandline(), repository.getUserName(), repository.getPassword(), repository.isCheckExternals());
}
Also used : SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) HgTestRepo(com.thoughtworks.go.helper.HgTestRepo) SvnMaterialConfig(com.thoughtworks.go.config.materials.svn.SvnMaterialConfig) Before(org.junit.Before)

Example 4 with HgTestRepo

use of com.thoughtworks.go.helper.HgTestRepo 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(temporaryFolder);
    SvnTestRepo svnRepo = new SvnTestRepo(temporaryFolder);
    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);
}
Also used : StubScheduleCheckCompletedListener(com.thoughtworks.go.server.messaging.StubScheduleCheckCompletedListener) Username(com.thoughtworks.go.server.domain.Username) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) GoConfigFileHelper(com.thoughtworks.go.util.GoConfigFileHelper) HgTestRepo(com.thoughtworks.go.helper.HgTestRepo) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString)

Example 5 with HgTestRepo

use of com.thoughtworks.go.helper.HgTestRepo in project gocd by gocd.

the class MixedMultipleMaterialsTest method createRepo.

@Before
public void createRepo() throws IOException {
    svnRepo = new SvnTestRepo(temporaryFolder);
    hgRepo = new HgTestRepo(temporaryFolder);
    gitRepo = new GitTestRepo(temporaryFolder);
    pipelineDir = temporaryFolder.newFolder();
}
Also used : GitTestRepo(com.thoughtworks.go.domain.materials.git.GitTestRepo) SvnTestRepo(com.thoughtworks.go.helper.SvnTestRepo) HgTestRepo(com.thoughtworks.go.helper.HgTestRepo) Before(org.junit.Before)

Aggregations

HgTestRepo (com.thoughtworks.go.helper.HgTestRepo)23 BeforeEach (org.junit.jupiter.api.BeforeEach)8 SvnTestRepo (com.thoughtworks.go.helper.SvnTestRepo)7 Before (org.junit.Before)7 ConfigRepoConfig (com.thoughtworks.go.config.remote.ConfigRepoConfig)4 ConfigTestRepo (com.thoughtworks.go.helper.ConfigTestRepo)4 GoDiskSpaceMonitor (com.thoughtworks.go.server.cronjob.GoDiskSpaceMonitor)4 GoConfigFileHelper (com.thoughtworks.go.util.GoConfigFileHelper)4 Filter (com.thoughtworks.go.config.materials.Filter)3 IgnoredFiles (com.thoughtworks.go.config.materials.IgnoredFiles)3 MaterialRevisions (com.thoughtworks.go.domain.MaterialRevisions)3 SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)3 MDUPerformanceLogger (com.thoughtworks.go.server.perf.MDUPerformanceLogger)3 File (java.io.File)3 StringContains.containsString (org.hamcrest.core.StringContains.containsString)3 Test (org.junit.Test)3 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)2 Materials (com.thoughtworks.go.config.materials.Materials)2 Allow (com.thoughtworks.go.config.rules.Allow)2 RevisionContext (com.thoughtworks.go.domain.materials.RevisionContext)2