@@ -73,6 +73,7 @@ def log_exception():
73
73
74
74
@pytest .mark .parametrize ("level" , ["debug" , "info" , "error" ])
75
75
def test_record_format_per_log_level (client_and_log_handler , level ):
76
+ """Test if log messages are formatted correctly for all log levels"""
76
77
api_client , handler = client_and_log_handler
77
78
78
79
response = api_client .get ("/log/levels/" + level )
@@ -92,6 +93,7 @@ def test_record_format_per_log_level(client_and_log_handler, level):
92
93
93
94
94
95
def test_correlation_id_given (client_and_log_handler ):
96
+ """Test if a given correlation ID is added to the logs"""
95
97
api_client , handler = client_and_log_handler
96
98
97
99
response = api_client .get ("/log/levels/debug" , headers = {"X-Correlation-Id" : "abc-def" })
@@ -104,6 +106,7 @@ def test_correlation_id_given(client_and_log_handler):
104
106
105
107
106
108
def test_correlation_id_generated (client_and_log_handler ):
109
+ """Test if a missing correlation ID is replaced by an autogenerated UUID"""
107
110
api_client , handler = client_and_log_handler
108
111
109
112
response = api_client .get ("/log/levels/debug" )
@@ -119,6 +122,7 @@ def test_correlation_id_generated(client_and_log_handler):
119
122
120
123
121
124
def test_extra_property (client_and_log_handler ):
125
+ """Test adding an extra property to a log message"""
122
126
api_client , handler = client_and_log_handler
123
127
124
128
response = api_client .get ("/log/extra_property" )
@@ -131,6 +135,7 @@ def test_extra_property(client_and_log_handler):
131
135
132
136
133
137
def test_exception_logged_with_stack_trace (client_and_log_handler ):
138
+ """Test if the details of a stack trace are logged"""
134
139
api_client , handler = client_and_log_handler
135
140
136
141
response = api_client .get ("/log/exception" )
0 commit comments