def test_redaction_rules_custom(minimal_kwargs): custom_rule = {"match_expression": "foo", "replacement": "bar"} annotations = { "kubernetes-log-watcher/scalyr-redaction-rules": json.dumps([{ "container": "cnt", "redaction-rules": [custom_rule] }]) } assert get_redaction_rules( annotations, minimal_kwargs) == [custom_rule, JWT_REDACTION_RULE]
def test_redaction_rules_no_annotation(minimal_kwargs): assert get_redaction_rules({}, minimal_kwargs) == [JWT_REDACTION_RULE]