Skip to content

Commit 6af5ce8

Browse files
author
Jérémy James Toussaint
committed
Using tmp folder for shouldRunStandardCompute
1 parent 24b3d1a commit 6af5ce8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/test/java/com/iexec/worker/compute/ComputeManagerServiceTests.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,17 @@ public void shouldRunTeePreComputeWithFailureResponse() {
202202
// compute
203203

204204
@Test
205-
public void shouldRunStandardCompute() {
205+
public void shouldRunStandardCompute() throws IOException {
206206
taskDescription.setTeeTask(false);
207207
DockerRunResponse expectedDockerRunResponse =
208208
DockerRunResponse.builder()
209-
.isSuccessful(true)
210-
.dockerLogs(dockerLogs)
211-
.build();
209+
.isSuccessful(true)
210+
.dockerLogs(dockerLogs)
211+
.build();
212212
when(appComputeService.runCompute(taskDescription,
213213
"")).thenReturn(expectedDockerRunResponse);
214+
when(workerConfigurationService.getTaskIexecOutDir(CHAIN_TASK_ID))
215+
.thenReturn(jUnitTemporaryFolder.newFolder().getAbsolutePath());
214216

215217
AppComputeResponse appComputeResponse =
216218
computeManagerService.runCompute(taskDescription, "");
@@ -349,7 +351,8 @@ public void shouldRunTeePostComputeWithFailureResponse() {
349351
.isSuccessful(false)
350352
.dockerLogs(dockerLogs)
351353
.build();
352-
when(postComputeService.runTeePostCompute(taskDescription, SECURE_SESSION_ID))
354+
when(postComputeService.runTeePostCompute(taskDescription,
355+
SECURE_SESSION_ID))
353356
.thenReturn(expectedDockerRunResponse);
354357

355358
PostComputeResponse postComputeResponse =

0 commit comments

Comments
 (0)