summaryrefslogtreecommitdiffstats
path: root/tests/py/any
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-06-20 11:45:53 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-06-20 18:10:56 +0200
commitae8786756b0ca9fd308a0089842b93dc3c329e25 (patch)
treebbd57c8e9ebb55a0335e82c6f3cc6ad774c29b72 /tests/py/any
parent29bed4fa594c3f6e343a8b5669d61e20c7129cca (diff)
src: add json support for last statement
This patch adds json support for the last statement, it works for me here. However, tests/py still displays a 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}]' Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any')
-rw-r--r--tests/py/any/last.t.json16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/py/any/last.t.json b/tests/py/any/last.t.json
new file mode 100644
index 00000000..2a2b9e72
--- /dev/null
+++ b/tests/py/any/last.t.json
@@ -0,0 +1,16 @@
+# last
+[
+ {
+ "last": null
+ }
+]
+
+# last used 300s
+[
+ {
+ "last": {
+ "used": 300000
+ }
+ }
+]
+