]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: add json dump files
authorFlorian Westphal <fw@strlen.de>
Sun, 29 Jun 2025 10:39:14 +0000 (12:39 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 30 Jun 2025 12:36:58 +0000 (14:36 +0200)
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/json/dumps/single_flag.json-nft [new file with mode: 0644]
tests/shell/testcases/json/dumps/single_flag.nft [new file with mode: 0644]

diff --git a/tests/shell/testcases/json/dumps/single_flag.json-nft b/tests/shell/testcases/json/dumps/single_flag.json-nft
new file mode 100644 (file)
index 0000000..512888b
--- /dev/null
@@ -0,0 +1,50 @@
+{
+  "nftables": [
+    {
+      "metainfo": {
+        "version": "VERSION",
+        "release_name": "RELEASE_NAME",
+        "json_schema_version": 1
+      }
+    },
+    {
+      "table": {
+        "family": "ip",
+        "name": "t",
+        "handle": 0
+      }
+    },
+    {
+      "chain": {
+        "family": "ip",
+        "table": "t",
+        "name": "c",
+        "handle": 0
+      }
+    },
+    {
+      "rule": {
+        "family": "ip",
+        "table": "t",
+        "chain": "c",
+        "handle": 0,
+        "expr": [
+          {
+            "queue": {
+              "num": {
+                "range": [
+                  1,
+                  10
+                ]
+              },
+              "flags": [
+                "bypass",
+                "fanout"
+              ]
+            }
+          }
+        ]
+      }
+    }
+  ]
+}
diff --git a/tests/shell/testcases/json/dumps/single_flag.nft b/tests/shell/testcases/json/dumps/single_flag.nft
new file mode 100644 (file)
index 0000000..437e698
--- /dev/null
@@ -0,0 +1,5 @@
+table ip t {
+       chain c {
+               queue flags bypass,fanout to 1-10
+       }
+}