diff --git a/wkd-java-cli/src/main/java/pgp/wkd/cli/command/Fetch.java b/wkd-java-cli/src/main/java/pgp/wkd/cli/command/Fetch.java index eff5424..91d008e 100644 --- a/wkd-java-cli/src/main/java/pgp/wkd/cli/command/Fetch.java +++ b/wkd-java-cli/src/main/java/pgp/wkd/cli/command/Fetch.java @@ -39,9 +39,11 @@ public class Fetch implements Runnable { ) boolean armor = false; - private static CertificateDiscoverer discoverer = new DefaultCertificateDiscoverer( + public static final CertificateDiscoverer DEFAULT_DISCOVERER = new DefaultCertificateDiscoverer( new PGPainlessCertificateParser(), new HttpsUrlConnectionCertificateFetcher()); + private static CertificateDiscoverer discoverer = DEFAULT_DISCOVERER; + @Override public void run() { diff --git a/wkd-java-cli/src/test/java/pgp/wkd/cli/test_suite/TestSuiteTestRunner.java b/wkd-java-cli/src/test/java/pgp/wkd/cli/test_suite/TestSuiteTestRunner.java index 4130fde..04c4951 100644 --- a/wkd-java-cli/src/test/java/pgp/wkd/cli/test_suite/TestSuiteTestRunner.java +++ b/wkd-java-cli/src/test/java/pgp/wkd/cli/test_suite/TestSuiteTestRunner.java @@ -4,6 +4,7 @@ package pgp.wkd.cli.test_suite; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; @@ -70,4 +71,9 @@ public class TestSuiteTestRunner { } }); } + + @AfterAll + public static void reset() { + Fetch.setCertificateDiscoverer(Fetch.DEFAULT_DISCOVERER); + } }