]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: monitor: Fix for wrong ordering in expected JSON output
authorPhil Sutter <phil@nwl.cc>
Tue, 29 Aug 2023 13:44:25 +0000 (15:44 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 29 Aug 2023 16:12:57 +0000 (18:12 +0200)
Adjust JSON for delete before add for replace after respective kernel
fix, too.

Fixes: ba786ac758fba ("tests: monitor: update insert and replace commands")
Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/monitor/testcases/simple.t

index c1c7bcfc08beb2096dea29ab8144445dff518268..67be5c85ab85dc5ab686e638f556c43c9e3576bc 100644 (file)
@@ -20,8 +20,8 @@ J {"insert": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0,
 I replace rule ip t c handle 2 accept comment "foo bar"
 O delete rule ip t c handle 2
 O add rule ip t c handle 5 accept comment "foo bar"
-J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "comment": "foo bar", "expr": [{"accept": null}]}}}
 J {"delete": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"accept": null}]}}}
+J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "comment": "foo bar", "expr": [{"accept": null}]}}}
 
 I add counter ip t cnt
 O add counter ip t cnt { packets 0 bytes 0 }