Skip to content

Commit

Permalink
#167 Updating test for outside path delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Nov 26, 2024
1 parent f9e5537 commit fbbd636
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,15 @@ public void delete() throws IOException {
public void deleteOutsidePath() throws IOException {

final File tempFile = File.createTempFile("phileas-", "-temp");
tempFile.deleteOnExit();

Assertions.assertTrue(Files.exists(tempFile.toPath()));
LOGGER.info("Temp file: {}", tempFile.getAbsolutePath());

final String name = "../" + tempFile.getName();
LOGGER.info("Policy name: {}", name);

final PolicyService policyService = new LocalPolicyService(getConfiguration());

policyService.delete(name);

Assertions.assertTrue(Files.exists(tempFile.toPath()));
Assertions.assertThrows(IOException.class, () -> policyService.delete(name));

}

Expand Down

0 comments on commit fbbd636

Please sign in to comment.