File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -68,5 +68,7 @@ def set_up_logging(logging_config: LoggingConfig) -> None:
6868
6969 logger .setLevel (logging_config .level )
7070
71+ set_up_stream_handler (logger , logging_config )
72+
7173 if logging_config .graylog .enabled :
7274 set_up_graylog_handler (logger , logging_config )
Original file line number Diff line number Diff line change 33import pytest
44from pytest import FixtureRequest
55
6+ from daq_config_server .log import GraylogConfig , LoggingConfig , set_up_logging
67from daq_config_server .testing ._utils import make_test_response
78from daq_config_server .whitelist import get_whitelist
89from tests .constants import TEST_WHITELIST_RESPONSE
@@ -27,3 +28,12 @@ def test_friendly_whitelist(request: FixtureRequest):
2728 yield
2829
2930 get_whitelist .cache_clear ()
31+
32+
33+ TestLogConfig = LoggingConfig (graylog = GraylogConfig (enabled = False ))
34+
35+
36+ @pytest .fixture (autouse = True )
37+ def test_friendly_logger ():
38+ # Make sure we don't post to Graylog when running tests
39+ set_up_logging (TestLogConfig )
You can’t perform that action at this time.
0 commit comments