]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: monitor: Fix monitor JSON output for insert command
authorPhil Sutter <phil@nwl.cc>
Tue, 29 Aug 2023 13:17:13 +0000 (15:17 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 29 Aug 2023 16:12:56 +0000 (18:12 +0200)
Looks like commit ba786ac758fba ("tests: monitor: update insert and
replace commands") missed to also fix expected JSON output.

Fixes: 48d20b8cf162e ("monitor: honor NLM_F_APPEND flag for rules")
Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/monitor/testcases/simple.t

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