diff options
author | Phil Sutter <phil@nwl.cc> | 2024-03-22 15:04:40 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-04-12 14:33:14 +0200 |
commit | 8abe71f862e6248517365bec4bac31d85141cf69 (patch) | |
tree | a80107a585a0fc8b9a4b176225ba9d550caf3563 /tests/py/nft-test.py | |
parent | 0c17b910b3e19c4eacf5567f90b6545ed1fd8aac (diff) |
tests: py: Warn if recorded JSON output matches the input
Actively support spring-cleaning by nagging callers.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/nft-test.py')
-rwxr-xr-x | tests/py/nft-test.py | 2 |
1 files changed, 2 insertions, 0 deletions
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": |