mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
debugging WebDAV + Crypto + NIO
This commit is contained in:
@@ -19,14 +19,30 @@ import java.nio.file.Paths;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.cryptomator.filesystem.FileSystem;
|
||||
import org.cryptomator.filesystem.crypto.CryptoEngineTestModule;
|
||||
import org.cryptomator.filesystem.crypto.CryptoFileSystemDelegate;
|
||||
import org.cryptomator.filesystem.crypto.CryptoFileSystemTestComponent;
|
||||
import org.cryptomator.filesystem.crypto.DaggerCryptoFileSystemTestComponent;
|
||||
import org.cryptomator.filesystem.nio.NioFileSystem;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
public class NioWebDavServer {
|
||||
|
||||
private static final CryptoFileSystemTestComponent CRYPTO_FS_COMP = DaggerCryptoFileSystemTestComponent.builder().cryptoEngineModule(new CryptoEngineTestModule()).build();
|
||||
private static final String PATH_TO_SERVE_PROPERTY = "pathToServe";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new FileSystemWebDavServer(nioFileSystem()).run();
|
||||
new FileSystemWebDavServer(cryptoFileSystem()).run();
|
||||
}
|
||||
|
||||
private static FileSystem cryptoFileSystem() {
|
||||
FileSystem shorteningFileSystem = shorteningFileSystem();
|
||||
CRYPTO_FS_COMP.cryptoFileSystemFactory().initializeNew(shorteningFileSystem, "asd");
|
||||
return CRYPTO_FS_COMP.cryptoFileSystemFactory().unlockExisting(shorteningFileSystem, "asd", Mockito.mock(CryptoFileSystemDelegate.class));
|
||||
}
|
||||
|
||||
private static FileSystem shorteningFileSystem() {
|
||||
return CRYPTO_FS_COMP.shorteningFileSystemFactory().get(nioFileSystem());
|
||||
}
|
||||
|
||||
private static FileSystem nioFileSystem() {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<Loggers>
|
||||
<!-- show our own debug messages: -->
|
||||
<Logger name="org.cryptomator" level="DEBUG" />
|
||||
<Logger name="org.eclipse.jetty.server.Server" level="DEBUG" />
|
||||
<!-- mute dependencies: -->
|
||||
<Root level="INFO">
|
||||
<AppenderRef ref="Console" />
|
||||
|
||||
Reference in New Issue
Block a user