From 6b0d8a48c2e99b133b6158ce1633f235f6545f10 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 29 Jun 2021 14:05:01 +0200 Subject: [PATCH] added temporary dummy health checks for testing purposes [ci skip] --- .../ui/health/DummyHealthChecks.java | 41 +++++++++++++++++++ ...ryptomator.cryptofs.health.api.HealthCheck | 3 ++ 2 files changed, 44 insertions(+) create mode 100644 src/main/java/org/cryptomator/ui/health/DummyHealthChecks.java create mode 100644 src/main/resources/META-INF/services/org.cryptomator.cryptofs.health.api.HealthCheck diff --git a/src/main/java/org/cryptomator/ui/health/DummyHealthChecks.java b/src/main/java/org/cryptomator/ui/health/DummyHealthChecks.java new file mode 100644 index 000000000..d2bccff37 --- /dev/null +++ b/src/main/java/org/cryptomator/ui/health/DummyHealthChecks.java @@ -0,0 +1,41 @@ +package org.cryptomator.ui.health; + +import org.cryptomator.cryptofs.VaultConfig; +import org.cryptomator.cryptofs.health.api.DiagnosticResult; +import org.cryptomator.cryptofs.health.api.HealthCheck; +import org.cryptomator.cryptolib.api.Cryptor; +import org.cryptomator.cryptolib.api.Masterkey; + +import java.nio.file.Path; +import java.util.function.Consumer; + +/** + * FIXME: Remove in production release + */ +public class DummyHealthChecks { + + public static class DummyCheck1 implements HealthCheck { + + @Override + public void check(Path path, VaultConfig vaultConfig, Masterkey masterkey, Cryptor cryptor, Consumer consumer) { + // no-op + } + } + + public static class DummyCheck2 implements HealthCheck { + + @Override + public void check(Path path, VaultConfig vaultConfig, Masterkey masterkey, Cryptor cryptor, Consumer consumer) { + // no-op + } + } + + public static class DummyCheck3 implements HealthCheck { + + @Override + public void check(Path path, VaultConfig vaultConfig, Masterkey masterkey, Cryptor cryptor, Consumer consumer) { + // no-op + } + } + +} diff --git a/src/main/resources/META-INF/services/org.cryptomator.cryptofs.health.api.HealthCheck b/src/main/resources/META-INF/services/org.cryptomator.cryptofs.health.api.HealthCheck new file mode 100644 index 000000000..e78e709b4 --- /dev/null +++ b/src/main/resources/META-INF/services/org.cryptomator.cryptofs.health.api.HealthCheck @@ -0,0 +1,3 @@ +org.cryptomator.ui.health.DummyHealthChecks$DummyCheck1 +org.cryptomator.ui.health.DummyHealthChecks$DummyCheck2 +org.cryptomator.ui.health.DummyHealthChecks$DummyCheck3 \ No newline at end of file