From 8abe71f862e6248517365bec4bac31d85141cf69 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 22 Mar 2024 15:04:40 +0100 Subject: [PATCH] tests: py: Warn if recorded JSON output matches the input Actively support spring-cleaning by nagging callers. Signed-off-by: Phil Sutter --- tests/py/nft-test.py | 2 ++ 1 file changed, 2 insertions(+) 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": -- 2.47.3