Search in sources :

Example 1 with P4Fixture

use of com.thoughtworks.go.domain.materials.perforce.P4Fixture in project gocd by gocd.

the class BuildWorkEnvironmentVariablesTest method setUp.

@Before
public void setUp() throws Exception {
    initMocks(this);
    dir = temporaryFolder.newFolder("someFolder");
    environmentVariableContext = new EnvironmentVariableContext();
    svnRepoFixture = new SvnRepoFixture("../common/src/test/resources/data/svnrepo", temporaryFolder);
    svnRepoFixture.createRepository();
    command = new SvnCommand(null, svnRepoFixture.getEnd2EndRepoUrl());
    pipelineConfig = PipelineConfigMother.createPipelineConfig(PIPELINE_NAME, STAGE_NAME, JOB_NAME);
    svnMaterial = 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();
    p4Fixture = new P4Fixture();
    p4Material = getP4Material();
}
Also used : P4Fixture(com.thoughtworks.go.domain.materials.perforce.P4Fixture) SvnCommand(com.thoughtworks.go.domain.materials.svn.SvnCommand) DependencyMaterial(com.thoughtworks.go.config.materials.dependency.DependencyMaterial) EnvironmentVariableContext(com.thoughtworks.go.util.command.EnvironmentVariableContext) SvnRepoFixture(com.thoughtworks.go.utils.SvnRepoFixture) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) Before(org.junit.Before)

Example 2 with P4Fixture

use of com.thoughtworks.go.domain.materials.perforce.P4Fixture in project gocd by gocd.

the class P4MaterialUpdaterTest method setup.

@Before
public void setup() throws Exception {
    repo = P4TestRepo.createP4TestRepo(temporaryFolder, temporaryFolder.newFolder());
    repo.onSetup();
    p4Fixture = new P4Fixture();
    p4Fixture.setRepo(this.repo);
    workingDir = temporaryFolder.newFolder("p4Client");
    if (workingDir == null) {
        throw new RuntimeException();
    }
    p4 = p4Fixture.createClient();
}
Also used : P4Fixture(com.thoughtworks.go.domain.materials.perforce.P4Fixture) Before(org.junit.Before)

Example 3 with P4Fixture

use of com.thoughtworks.go.domain.materials.perforce.P4Fixture in project gocd by gocd.

the class P4MaterialUpdaterTicketTest method setup.

@Before
public void setup() throws Exception {
    repo = P4TestRepo.createP4TestRepoWithTickets(temporaryFolder, temporaryFolder.newFolder());
    repo.onSetup();
    p4Fixture = new P4Fixture();
    p4Fixture.setRepo(this.repo);
    workingDir = temporaryFolder.newFolder("p4Client");
    if (workingDir == null) {
        throw new RuntimeException();
    }
    p4 = p4Fixture.createClient();
}
Also used : P4Fixture(com.thoughtworks.go.domain.materials.perforce.P4Fixture) Before(org.junit.Before)

Example 4 with P4Fixture

use of com.thoughtworks.go.domain.materials.perforce.P4Fixture in project gocd by gocd.

the class P4MultipleMaterialsTest method setUp.

@Before
public void setUp() throws Exception {
    p4Fixture = new P4Fixture();
    clientFolder = temporaryFolder.newFolder();
    p4TestRepo = createTestRepo();
    p4Fixture.setRepo(p4TestRepo);
    clientFolder = temporaryFolder.newFolder("p4Client");
    p4 = P4Client.fromServerAndPort(null, p4Fixture.port(), "cceuser", null, DEFAULT_CLIENT_NAME, false, clientFolder, "", inMemoryConsumer(), true);
    p4TestRepo.onSetup();
    p4Fixture.start();
}
Also used : P4Fixture(com.thoughtworks.go.domain.materials.perforce.P4Fixture) Before(org.junit.Before)

Aggregations

P4Fixture (com.thoughtworks.go.domain.materials.perforce.P4Fixture)4 Before (org.junit.Before)4 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)1 DependencyMaterial (com.thoughtworks.go.config.materials.dependency.DependencyMaterial)1 SvnCommand (com.thoughtworks.go.domain.materials.svn.SvnCommand)1 EnvironmentVariableContext (com.thoughtworks.go.util.command.EnvironmentVariableContext)1 SvnRepoFixture (com.thoughtworks.go.utils.SvnRepoFixture)1