From aab7913f0e9bfd331980a4e6a478d3e350be9e89 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 3 Sep 2018 16:15:22 +0200 Subject: tests: fix json output for osf, socket and tproxy expressions Signed-off-by: Florian Westphal --- tests/py/inet/osf.t.json | 18 ++++++++++-------- tests/py/inet/socket.t.json | 5 +++-- tests/py/inet/tproxy.t.json | 25 ++++++++++++++++++++----- tests/py/ip/tproxy.t.json | 23 ++++++++++++++++++----- tests/py/ip6/tproxy.t.json | 25 ++++++++++++++++++++----- 5 files changed, 71 insertions(+), 25 deletions(-) diff --git a/tests/py/inet/osf.t.json b/tests/py/inet/osf.t.json index 10fb68c1..4bb413ca 100644 --- a/tests/py/inet/osf.t.json +++ b/tests/py/inet/osf.t.json @@ -7,6 +7,7 @@ "key": "name" } }, + "op": "==", "right": "Linux" } } @@ -21,6 +22,7 @@ "key": "name" } }, + "op": "==", "right": { "set": [ "MacOs", @@ -35,19 +37,14 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "map": { - "left": { - "osf": { - "key": "name" - } - }, - "right": { + "data": { "set": [ [ "MacOs", @@ -58,6 +55,11 @@ 1 ] ] + }, + "key": { + "osf": { + "key": "name" + } } } } diff --git a/tests/py/inet/socket.t.json b/tests/py/inet/socket.t.json index d672c500..99d6e248 100644 --- a/tests/py/inet/socket.t.json +++ b/tests/py/inet/socket.t.json @@ -7,7 +7,7 @@ "key": "transparent" } }, - "op": "==", + "op": "==", "right": 0 } } @@ -22,7 +22,7 @@ "key": "transparent" } }, - "op": "==", + "op": "==", "right": 1 } } @@ -37,6 +37,7 @@ "key": "mark" } }, + "op": "==", "right": 5 } } diff --git a/tests/py/inet/tproxy.t.json b/tests/py/inet/tproxy.t.json index 88304206..2897d200 100644 --- a/tests/py/inet/tproxy.t.json +++ b/tests/py/inet/tproxy.t.json @@ -3,8 +3,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, @@ -21,8 +24,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, @@ -40,8 +46,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, @@ -58,8 +67,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, @@ -77,8 +89,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, diff --git a/tests/py/ip/tproxy.t.json b/tests/py/ip/tproxy.t.json index 81b7c188..1936b5f4 100644 --- a/tests/py/ip/tproxy.t.json +++ b/tests/py/ip/tproxy.t.json @@ -3,8 +3,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, @@ -21,8 +24,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, @@ -42,9 +48,10 @@ "left": { "payload": { "field": "protocol", - "name": "ip" + "protocol": "ip" } }, + "op": "==", "right": 6 } }, @@ -60,8 +67,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, @@ -78,8 +88,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, diff --git a/tests/py/ip6/tproxy.t.json b/tests/py/ip6/tproxy.t.json index b627b20e..7372acb9 100644 --- a/tests/py/ip6/tproxy.t.json +++ b/tests/py/ip6/tproxy.t.json @@ -3,8 +3,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, @@ -21,8 +24,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, @@ -40,8 +46,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, @@ -57,8 +66,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 6 } }, @@ -75,8 +87,11 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { + "key": "l4proto" + } }, + "op": "==", "right": 17 } }, -- cgit v1.2.3