]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: fix json single-flag output for fib & synproxy
authorFlorian Westphal <fw@strlen.de>
Mon, 2 Jun 2025 12:12:16 +0000 (14:12 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 4 Jun 2025 10:41:10 +0000 (12:41 +0200)
Blamed commits change output format but did not adjust existing tests:
  inet/fib.t: WARNING: line 16: '{"nftables": ..

Fixes: 38f99ee84fe6 ("json: Print single synproxy flags as non-array")
Fixes: dbe5c44f2b89 ("json: Print single fib flag as non-array")
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Phil Sutter <phil@nwl.cc>
tests/py/inet/fib.t.json.output
tests/py/inet/synproxy.t.json.output [new file with mode: 0644]

index 52cd46bc0e1218ea913949f4671bdda0e99fd53e..e21f1e72c636ca2e4d18fc65cd97cbdc378aa701 100644 (file)
     }
 ]
 
+# fib daddr oif exists
+[
+    {
+        "match": {
+            "left": {
+                "fib": {
+                    "flags": "daddr",
+                    "result": "oif"
+                }
+            },
+            "op": "==",
+            "right": true
+        }
+    }
+]
+
+# fib daddr oif missing
+[
+    {
+        "match": {
+            "left": {
+                "fib": {
+                    "flags": "daddr",
+                    "result": "oif"
+                }
+            },
+            "op": "==",
+            "right": false
+        }
+    }
+]
+
diff --git a/tests/py/inet/synproxy.t.json.output b/tests/py/inet/synproxy.t.json.output
new file mode 100644 (file)
index 0000000..e32cdfb
--- /dev/null
@@ -0,0 +1,17 @@
+# synproxy timestamp
+[
+    {
+        "synproxy": {
+            "flags": "timestamp"
+        }
+    }
+]
+
+# synproxy sack-perm
+[
+    {
+        "synproxy": {
+            "flags": "sack-perm"
+        }
+    }
+]