Skip to content

Commit

Permalink
Merge pull request #37395 from erichaagdev
Browse files Browse the repository at this point in the history
* gh-37395:
  Mock working directory for extract test

Closes gh-37395
  • Loading branch information
wilkinsona committed Sep 22, 2023
2 parents 98acca9 + a2be276 commit 6936d7e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ void runWithJarFileThatWouldWriteEntriesOutsideDestinationFails() throws Excepti
}
});
given(this.context.getArchiveFile()).willReturn(this.jarFile);
given(this.context.getWorkingDir()).willReturn(this.extract);
assertThatIllegalStateException()
.isThrownBy(() -> this.command.run(Collections.emptyMap(), Collections.emptyList()))
.withMessageContaining("Entry 'e/../../e.jar' would be written");
Expand Down

0 comments on commit 6936d7e

Please sign in to comment.