Ejemplo n.º 1
0
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]
Ejemplo n.º 2
0
def test_redaction_rules_no_annotation(minimal_kwargs):
    assert get_redaction_rules({}, minimal_kwargs) == [JWT_REDACTION_RULE]