Skip to content

Commit 6936d7e

Browse files
committed
Merge pull request spring-projects#37395 from erichaagdev
* spring-projectsgh-37395: Mock working directory for extract test Closes spring-projectsgh-37395
2 parents 98acca9 + a2be276 commit 6936d7e

File tree

1 file changed

+1
-0
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-jarmode-layertools/src/test/java/org/springframework/boot/jarmode/layertools

1 file changed

+1
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-jarmode-layertools/src/test/java/org/springframework/boot/jarmode/layertools/ExtractCommandTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ void runWithJarFileThatWouldWriteEntriesOutsideDestinationFails() throws Excepti
167167
}
168168
});
169169
given(this.context.getArchiveFile()).willReturn(this.jarFile);
170+
given(this.context.getWorkingDir()).willReturn(this.extract);
170171
assertThatIllegalStateException()
171172
.isThrownBy(() -> this.command.run(Collections.emptyMap(), Collections.emptyList()))
172173
.withMessageContaining("Entry 'e/../../e.jar' would be written");

0 commit comments

Comments
 (0)