Skip to content

Commit

Permalink
fix the assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup committed Nov 28, 2019
1 parent 3826190 commit d44debd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,16 @@ public void filePermissions() throws Exception {
public void folderPermissions() throws Exception {
Path tempDirectory = Files.createTempDirectory("reusable_test");
MountableFile mountableFile = MountableFile.forHostPath(tempDirectory);
assumeThat(new File(mountableFile.getResolvedPath())).isDirectory();
assertThat(new File(mountableFile.getResolvedPath())).isDirectory();
Path subDir = Files.createDirectory(tempDirectory.resolve("sub"));
subDir.toFile().setWritable(false);
assumeThat(subDir.toFile().canWrite()).isFalse();
container.withCopyFileToContainer(mountableFile, "/foo/bar/");

long hash1 = container.hashCopiedFiles().getValue();

subDir.toFile().setWritable(true);
assumeThat(subDir.toFile()).canWrite();

assertThat(container.hashCopiedFiles().getValue()).isNotEqualTo(hash1);
}
Expand Down

0 comments on commit d44debd

Please sign in to comment.