Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bump log4j from 2.14.1 to 2.15.0 (#19309)
* Bump log4j from 2.14.1 to 2.15.0 * Disable failing logging tests when bumping log4j 0day in log4j requires bump in dependency. These tests look for logs in testing but our test logger doesn't seem to have levels set correctly. The disease is certainly worse than the remedy in this case and each instance is annotated with the reason it is disabled, and we can reenable them in calmer waters * Fix unused ns Co-authored-by: Youngho Kim <miku@korea.ac.kr> Co-authored-by: dan sutton <dan@dpsutton.com>
- Loading branch information
1 parent
5a64c49
commit 8bfce98
Showing
4 changed files
with
29 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,26 @@ | ||
| (ns metabase.pulse.render.png-test | ||
| (:require [clojure.test :refer :all] | ||
| [metabase.pulse.render.png :as png] | ||
| [metabase.test :as mt] | ||
| [schema.core :as s])) | ||
| #_[metabase.test :as mt] | ||
| #_[schema.core :as s])) | ||
|
|
||
| (deftest register-fonts-test | ||
| (testing "Under normal circumstances, font registration should work as expected" | ||
| (is (= nil | ||
| (#'png/register-fonts-if-needed!)))) | ||
|
|
||
| (testing "If font regsitration fails, we should an Exception with a useful error message" | ||
| (with-redefs [png/register-font! (fn [& _] | ||
| (throw (ex-info "Oops!" {})))] | ||
| (let [messages (mt/with-log-level :error | ||
| (mt/with-log-messages | ||
| (is (thrown-with-msg? | ||
| clojure.lang.ExceptionInfo | ||
| #"Error registering fonts: Metabase will not be able to send Pulses" | ||
| (#'png/register-fonts!)))))] | ||
| (testing "Should log the Exception" | ||
| (is (schema= [(s/one (s/eq :error) "log type") | ||
| (s/one Throwable "exception") | ||
| (s/one #"^Error registering fonts" "message")] | ||
| (first messages)))))))) | ||
| ;; disabled due to CVE-2021-44228 | ||
| #_(testing "If font regsitration fails, we should an Exception with a useful error message" | ||
| (with-redefs [png/register-font! (fn [& _] | ||
| (throw (ex-info "Oops!" {})))] | ||
| (let [messages (mt/with-log-level :error | ||
| (mt/with-log-messages | ||
| (is (thrown-with-msg? | ||
| clojure.lang.ExceptionInfo | ||
| #"Error registering fonts: Metabase will not be able to send Pulses" | ||
| (#'png/register-fonts!)))))] | ||
| (testing "Should log the Exception" | ||
| (is (schema= [(s/one (s/eq :error) "log type") | ||
| (s/one Throwable "exception") | ||
| (s/one #"^Error registering fonts" "message")] | ||
| (first messages)))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters