From: Phil Sutter Date: Fri, 22 Mar 2024 14:04:40 +0000 (+0100) Subject: tests: py: Warn if recorded JSON output matches the input X-Git-Tag: v1.1.0~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8abe71f862e6;p=thirdparty%2Fnftables.git tests: py: Warn if recorded JSON output matches the input Actively support spring-cleaning by nagging callers. Signed-off-by: Phil Sutter --- diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index a7d27c25..1bc89558 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -809,6 +809,8 @@ def rule_add(rule, filename, lineno, force_all_family_option, filename_path): reason = "Invalid JSON syntax in expected output: %s" % json_expected print_error(reason) return [-1, warning, error, unit_tests] + if json_expected == json_input: + print_warning("Recorded JSON output matches input for: %s" % rule[0]) for table in table_list: if rule[1].strip() == "ok":