File tree 3 files changed +19
-4
lines changed
logprep/processor/requester
tests/unit/processor/requester
3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 10
10
### Features
11
11
### Improvements
12
12
13
+ * fix ` requester ` documentation
13
14
* replace ` BaseException ` with ` Exception ` for custom errors
14
15
* refactor ` generic_resolver ` to validate rules on startup instead of application of each rule
15
16
* rewrite the helper method ` add_field_to ` such that it always raises an ` FieldExistsWarning ` instead of return a bool.
16
17
* add new helper method ` add_fields_to ` to directly add multiple fields to one event
17
18
* refactored some processors to make use of the new helper methods
18
19
19
-
20
20
### Bugfix
21
21
22
- - fix ` confluent_kafka.store_offsets ` if ` last_valid_record ` is ` None ` , can happen if a rebalancing happens
22
+ * fix ` confluent_kafka.store_offsets ` if ` last_valid_record ` is ` None ` , can happen if a rebalancing happens
23
23
before the first message was pulled.
24
24
- fix pseudonymizer cache metrics not updated
25
25
Original file line number Diff line number Diff line change 16
16
requester:
17
17
url: https://internal.cmdb.local/api/v1/locations
18
18
method: POST
19
- content_type: application/json
20
19
target_field: cmdb.location
21
- header :
20
+ headers :
22
21
Authorization: Bearer askdfjpiowejf283u9r
23
22
json:
24
23
hostname: ${message.hostname}
Original file line number Diff line number Diff line change 1
1
# pylint: disable=protected-access
2
2
# pylint: disable=missing-docstring
3
3
import pytest
4
+
4
5
from logprep .processor .requester .rule import RequesterRule
5
6
6
7
@@ -16,6 +17,21 @@ def test_create_from_dict_returns_requester_rule(self):
16
17
@pytest .mark .parametrize (
17
18
["rule" , "error" , "message" ],
18
19
[
20
+ (
21
+ {
22
+ "filter" : "domain" ,
23
+ "requester" : {
24
+ "url" : "https://internal.cmdb.local/api/v1/locations" ,
25
+ "method" : "POST" ,
26
+ "target_field" : "cmdb.location" ,
27
+ "headers" : {"Authorization" : "Bearer askdfjpiowejf283u9r" },
28
+ "json" : {"hostname" : "${message.hostname}" },
29
+ },
30
+ "description" : "..." ,
31
+ },
32
+ None ,
33
+ None ,
34
+ ),
19
35
(
20
36
{
21
37
"filter" : "message" ,
You can’t perform that action at this time.
0 commit comments