Search in sources :

Example 1 with GoArtifactsManipulatorStub

use of com.thoughtworks.go.remote.work.GoArtifactsManipulatorStub in project gocd by gocd.

the class GoArtifactsManipulatorTest method setUp.

@BeforeEach
public void setUp(@TempDir Path tempDir) throws Exception {
    httpService = mock(HttpService.class);
    artifactFolder = TempDirUtils.createTempDirectoryIn(tempDir, "artifact_folder");
    tempFile = artifactFolder.resolve("file.txt").toFile();
    FileUtils.writeStringToFile(tempFile, "some-random-data", UTF_8);
    goArtifactsManipulatorStub = new GoArtifactsManipulatorStub(httpService);
    jobIdentifier = new JobIdentifier("pipeline1", 1, "label-1", "stage1", "1", "job1");
    AgentRuntimeInfo agentRuntimeInfo = new AgentRuntimeInfo(new AgentIdentifier("h", "1", "u"), AgentRuntimeStatus.Idle, currentWorkingDirectory(), null);
    goPublisher = new DefaultGoPublisher(goArtifactsManipulatorStub, jobIdentifier, new BuildRepositoryRemoteStub(), agentRuntimeInfo, "utf-8");
}
Also used : AgentRuntimeInfo(com.thoughtworks.go.server.service.AgentRuntimeInfo) DefaultGoPublisher(com.thoughtworks.go.work.DefaultGoPublisher) HttpService(com.thoughtworks.go.util.HttpService) AgentIdentifier(com.thoughtworks.go.remote.AgentIdentifier) GoArtifactsManipulatorStub(com.thoughtworks.go.remote.work.GoArtifactsManipulatorStub) JobIdentifier(com.thoughtworks.go.domain.JobIdentifier) BuildRepositoryRemoteStub(com.thoughtworks.go.remote.work.BuildRepositoryRemoteStub) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with GoArtifactsManipulatorStub

use of com.thoughtworks.go.remote.work.GoArtifactsManipulatorStub in project gocd by gocd.

the class GoArtifactsManipulatorTest method setUp.

@Before
public void setUp() throws Exception {
    httpService = mock(HttpService.class);
    artifactFolder = temporaryFolder.newFolder("artifact_folder");
    tempFile = temporaryFolder.newFile("artifact_folder/file.txt");
    goArtifactsManipulatorStub = new GoArtifactsManipulatorStub(httpService);
    jobIdentifier = new JobIdentifier("pipeline1", 1, "label-1", "stage1", "1", "job1");
    AgentRuntimeInfo agentRuntimeInfo = new AgentRuntimeInfo(new AgentIdentifier("h", "1", "u"), AgentRuntimeStatus.Idle, currentWorkingDirectory(), null, false);
    goPublisher = new DefaultGoPublisher(goArtifactsManipulatorStub, jobIdentifier, new BuildRepositoryRemoteStub(), agentRuntimeInfo, "utf-8");
}
Also used : AgentRuntimeInfo(com.thoughtworks.go.server.service.AgentRuntimeInfo) DefaultGoPublisher(com.thoughtworks.go.work.DefaultGoPublisher) HttpService(com.thoughtworks.go.util.HttpService) AgentIdentifier(com.thoughtworks.go.remote.AgentIdentifier) GoArtifactsManipulatorStub(com.thoughtworks.go.remote.work.GoArtifactsManipulatorStub) JobIdentifier(com.thoughtworks.go.domain.JobIdentifier) BuildRepositoryRemoteStub(com.thoughtworks.go.remote.work.BuildRepositoryRemoteStub) Before(org.junit.Before)

Aggregations

JobIdentifier (com.thoughtworks.go.domain.JobIdentifier)2 AgentIdentifier (com.thoughtworks.go.remote.AgentIdentifier)2 BuildRepositoryRemoteStub (com.thoughtworks.go.remote.work.BuildRepositoryRemoteStub)2 GoArtifactsManipulatorStub (com.thoughtworks.go.remote.work.GoArtifactsManipulatorStub)2 AgentRuntimeInfo (com.thoughtworks.go.server.service.AgentRuntimeInfo)2 HttpService (com.thoughtworks.go.util.HttpService)2 DefaultGoPublisher (com.thoughtworks.go.work.DefaultGoPublisher)2 Before (org.junit.Before)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1