From 7ef89a85f6e028068c612822ffe81d290e82b3a0 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sat, 24 Jun 2023 19:14:35 +0200 Subject: tests: json: add missing/expected json output nft-test.py generates following warning: any/last.t: WARNING: line 12: '{"nftables": [{"add": {"rule": {"family": "ip", "table": "test-ip4", "chain": "input", "expr": [{"last": {"used": 300000}}]}}}]}': '[{"last": {"used": 300000}}]' mismatches '[{"last": null}]' This is because "last" expression is stateful; but nft-test.py explicitly asks for stateless output. Thus we need to provide a json.output file, without it, nft-test.py uses last.json as the expected output file. Fixes: ae8786756b0c ("src: add json support for last statement") Signed-off-by: Florian Westphal --- tests/py/any/last.t.json.output | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/py/any/last.t.json.output diff --git a/tests/py/any/last.t.json.output b/tests/py/any/last.t.json.output new file mode 100644 index 00000000..b8a977ed --- /dev/null +++ b/tests/py/any/last.t.json.output @@ -0,0 +1,14 @@ +# last +[ + { + "last": null + } +] + +# last used 300s +[ + { + "last": null + } +] + -- cgit v1.2.3