From 2ddf4e3fe155b1e4ff5dde8a587758d37d665ed4 Mon Sep 17 00:00:00 2001 From: eltrac Date: Mon, 14 Sep 2026 16:40:39 +0800 Subject: tests: disable logging in tests --- test/weepinbell/processor_test.clj | 4 +++- test/weepinbell/test_utility.clj | 6 +++++- test/weepinbell/verifier_test.clj | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/weepinbell/processor_test.clj b/test/weepinbell/processor_test.clj index 3756f4f..5f5a750 100644 --- a/test/weepinbell/processor_test.clj +++ b/test/weepinbell/processor_test.clj @@ -1,6 +1,8 @@ (ns weepinbell.processor-test (:require [clojure.test :refer [deftest is testing]] - [weepinbell.test-utility :refer [with-webmention]])) + [weepinbell.test-utility :refer [with-webmention disable-logging]])) + +(disable-logging) ;; Testing process-new-webmention ;; though we're calling a proxy function (process-webmention) diff --git a/test/weepinbell/test_utility.clj b/test/weepinbell/test_utility.clj index 22a6549..0e120c9 100644 --- a/test/weepinbell/test_utility.clj +++ b/test/weepinbell/test_utility.clj @@ -1,7 +1,8 @@ (ns weepinbell.test-utility (:require [compojure.core :refer [GET routes]] [org.httpkit.server :refer [run-server]] - [weepinbell.processor :as p])) + [weepinbell.processor :as p] + [taoensso.timbre :refer [merge-config!]])) (def mock-callbacks {:on-create (fn []) :on-delete (fn []) @@ -29,3 +30,6 @@ ~@body (~'server)))) +(defn disable-logging [] + (merge-config! {:min-level :report})) + diff --git a/test/weepinbell/verifier_test.clj b/test/weepinbell/verifier_test.clj index 9b81a72..2e375a5 100644 --- a/test/weepinbell/verifier_test.clj +++ b/test/weepinbell/verifier_test.clj @@ -1,7 +1,9 @@ (ns weepinbell.verifier-test (:require [clojure.test :refer [deftest testing is]] [weepinbell.verifier :as v] - [weepinbell.test-utility :refer [with-webmention]])) + [weepinbell.test-utility :refer [with-webmention disable-logging]])) + +(disable-logging) (deftest verification-happy-paths-test (testing "Test if processor can correctly verifies a Webmention." -- cgit v1.2.3