mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-22 20:51:27 +00:00
Co-authored-by: Sebastian Stenzel <overheadhunter@users.noreply.github.com>
This commit is contained in:
@@ -61,15 +61,9 @@ class CustomMountPointChooser implements MountPointChooser {
|
||||
LOG.debug("Successfully checked custom mount point: {}", mountPoint);
|
||||
yield false;
|
||||
}
|
||||
case NONE -> {
|
||||
//Requirement "NONE" doesn't make any sense here.
|
||||
//No need to prepare/verify a Mountpoint without requiring one...
|
||||
case NONE, UNUSED_ROOT_DIR, PARENT_OPT_MOUNT_POINT -> {
|
||||
throw new InvalidMountPointException(new IllegalStateException("Illegal MountPointRequirement"));
|
||||
}
|
||||
default -> {
|
||||
//Currently the case for "UNUSED_ROOT_DIR, PARENT_OPT_MOUNT_POINT"
|
||||
throw new InvalidMountPointException(new IllegalStateException("Not implemented"));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import org.cryptomator.common.settings.VaultSettings;
|
||||
import org.cryptomator.common.vaults.MountPointRequirement;
|
||||
import org.cryptomator.common.vaults.Volume;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
@@ -69,8 +68,9 @@ public class CustomMountPointChooserTest {
|
||||
Path hideaway = customMpc.getHideaway(mntPoint);
|
||||
Assertions.assertTrue(Files.exists(hideaway));
|
||||
|
||||
Assumptions.assumeTrue(OS.WINDOWS.isCurrentOs());
|
||||
Assertions.assertTrue((Boolean) Files.getAttribute(hideaway, "dos:hidden"));
|
||||
if(OS.WINDOWS.isCurrentOs()) {
|
||||
Assertions.assertTrue((Boolean) Files.getAttribute(hideaway, "dos:hidden"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,8 +102,9 @@ public class CustomMountPointChooserTest {
|
||||
//evaluate
|
||||
Assertions.assertTrue(Files.exists(hideaway));
|
||||
|
||||
Assumptions.assumeTrue(OS.WINDOWS.isCurrentOs());
|
||||
Assertions.assertTrue((Boolean) Files.getAttribute(hideaway, "dos:hidden"));
|
||||
if(OS.WINDOWS.isCurrentOs()) {
|
||||
Assertions.assertTrue((Boolean) Files.getAttribute(hideaway, "dos:hidden"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -122,8 +123,9 @@ public class CustomMountPointChooserTest {
|
||||
Assertions.assertTrue(Files.exists(hideaway));
|
||||
Assertions.assertTrue(Files.exists(mntPoint));
|
||||
|
||||
Assumptions.assumeTrue(OS.WINDOWS.isCurrentOs());
|
||||
Assertions.assertFalse((Boolean) Files.getAttribute(hideaway, "dos:hidden"));
|
||||
if(OS.WINDOWS.isCurrentOs()) {
|
||||
Assertions.assertFalse((Boolean) Files.getAttribute(hideaway, "dos:hidden"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -158,8 +160,9 @@ public class CustomMountPointChooserTest {
|
||||
Assertions.assertTrue(Files.exists(mntPoint));
|
||||
Assertions.assertTrue(Files.notExists(hideaway));
|
||||
|
||||
Assumptions.assumeTrue(OS.WINDOWS.isCurrentOs());
|
||||
Assertions.assertFalse((Boolean) Files.getAttribute(mntPoint, "dos:hidden"));
|
||||
if(OS.WINDOWS.isCurrentOs()) {
|
||||
Assertions.assertFalse((Boolean) Files.getAttribute(mntPoint, "dos:hidden"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user