diff mbox series

[nft,13/14] tests/py: Add missing JSON equivalent for inet/sets.t

Message ID 20180528134819.13625-14-phil@nwl.cc
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series JSON: Some minor schema changes | expand

Commit Message

Phil Sutter May 28, 2018, 1:48 p.m. UTC
This adds the missing JSON variant for the two rules which are supposed
to work.

Fixes: 2efbdf7b8fcf7 ("tests: py: allow to specify sets with a timeout")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tests/py/inet/sets.t.json | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 tests/py/inet/sets.t.json
diff mbox series

Patch

diff --git a/tests/py/inet/sets.t.json b/tests/py/inet/sets.t.json
new file mode 100644
index 0000000000000..75881f7145ccd
--- /dev/null
+++ b/tests/py/inet/sets.t.json
@@ -0,0 +1,37 @@ 
+# ip saddr @set1 drop
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "saddr",
+                    "name": "ip"
+                }
+            },
+            "right": "@set1"
+        }
+    },
+    {
+        "drop": null
+    }
+]
+
+# ip6 daddr != @set2 accept
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "daddr",
+                    "name": "ip6"
+                }
+            },
+            "op": "!=",
+            "right": "@set2"
+        }
+    },
+    {
+        "accept": null
+    }
+]
+