Search in sources :

Example 21 with HgTestRepo

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

the class BuildCauseProducerServiceWithFlipModificationTest method setup.

@BeforeEach
public void setup(@TempDir Path tempDir) throws Exception {
    configHelper = new GoConfigFileHelper();
    dbHelper.onSetUp();
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    svnRepository = new SvnTestRepo(tempDir);
    hgTestRepo = new HgTestRepo("testHgRepo", tempDir);
    repository = new SvnCommand(null, svnRepository.projectRepositoryUrl());
    svnMaterialConfig = svn(repository.getUrl().originalArgument(), 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) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 22 with HgTestRepo

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

the class ChangeMaterialsTest method setUp.

@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
    username = new Username(new CaseInsensitiveString("gli"));
    dbHelper.onSetUp();
    cruiseConfig = new GoConfigFileHelper().usingCruiseConfigDao(goConfigDao);
    cruiseConfig.onSetUp();
    hgTestRepo = new HgTestRepo(tempDir);
    SvnTestRepo svnRepo = new SvnTestRepo(tempDir);
    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 23 with HgTestRepo

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

the class BuildCauseProducerServiceIntegrationHgTest method setup.

@BeforeEach
public void setup(@TempDir Path tempDir) throws Exception {
    dbHelper.onSetUp();
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    hgTestRepo = new HgTestRepo("hgTestRepo1", tempDir);
    hgMaterial = MaterialsMother.hgMaterial(hgTestRepo.projectRepositoryUrl());
    hgMaterial.setFilter(new Filter(new IgnoredFiles("helper/**/*.*")));
    workingFolder = TempDirUtils.createTempDirectoryIn(tempDir, "workingFolder").toFile();
    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) BeforeEach(org.junit.jupiter.api.BeforeEach)

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