tests: add json test for vlan rule fix
PATCH 1/1 tests: add json test for vlan rule fix
From: "M. Braun" <[email protected]>
This fixes
ERROR: did not find JSON equivalent for rule 'ether type vlan ip protocol 1 accept'
when running
./nft-test.py -j bridge/vlan.t
Reported-by [email protected]
Signed-off-by Michael Braun <[email protected]>
--- tests/py/bridge/vlan.t.json | 31 ++++++++++++++++++++++++++++++ tests/py/bridge/vlan.t.json.output | 31 ++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 tests/py/bridge/vlan.t.json.output
tests/py/bridge/vlan.t.json +31 -0
@@ -499,3 +499,34 @@ } ] +# ether type vlan ip protocol 1 accept +[ + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "vlan" + } + }, + { + "match": { + "left": { + "payload": { + "field": "protocol", + "protocol": "ip" + } + }, + "op": "==", + "right": "icmp" + } + }, + { + "accept": null + } +] +
tests/py/bridge/vlan.t.json.output new file +31 -0
@@ -0,0 +1,31 @@ +# ether type vlan ip protocol 1 accept +[ + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "vlan" + } + }, + { + "match": { + "left": { + "payload": { + "field": "protocol", + "protocol": "ip" + } + }, + "op": "==", + "right": 1 + } + }, + { + "accept": null + } +] +
Signature · 1 line
2.20.1
Quoted 10 lines · On Sun, Aug 11, 2019 at 12:16:03PM +0200, [email protected] wrote:
From: "M. Braun" <[email protected]>
This fixes
ERROR: did not find JSON equivalent for rule 'ether type vlan ip protocol 1 accept'
when running
./nft-test.py -j bridge/vlan.t
Applied, thanks.