]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: json_echo: Drop rule handle before multi-add
authorPhil Sutter <phil@nwl.cc>
Tue, 20 Jan 2026 21:47:02 +0000 (22:47 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 20 Jan 2026 22:53:49 +0000 (23:53 +0100)
Now that JSON parser respects rule handles in explicit add commands, the
still present rule handle causes an error since the old rule does not
exist anymore.

Fixes: 50b5b71ebeee3 ("parser_json: Rewrite echo support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/json_echo/run-test.py

index a3085b35ade6b04e0c407d3615e36ec7a024b92e..7d0eca0aacaec7941d72c2c3e1d9932240ad9c80 100755 (executable)
@@ -290,6 +290,7 @@ add_quota["add"]["quota"]["name"] = "q"
 do_flush()
 
 print("doing multi add")
+del(add_rule["add"]["rule"]["handle"])
 add_multi = [ add_table, add_chain, add_set, add_rule ]
 out = do_command(add_multi)