summaryrefslogtreecommitdiffstats
path: root/tests/py/nft-test.py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-29 16:23:23 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-08-30 12:19:36 +0200
commit8125785d5c5d35ec275e508166091d5472748bc1 (patch)
treef95de547642eab67d12762a5297645e80ffa22c3 /tests/py/nft-test.py
parent2a4a5a2c8ae21f2bcf7e81b5eafea91d799ee88a (diff)
JSON: Review verdict statement and expression
Change jump and goto verdicts to become extensible by dedicating an object for the target parameter. While being at it, drop break and queue verdict expressions since they don't seem to exist, no idea where I got those from in the first place. For queue, there is a dedicated expression at least. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/nft-test.py')
-rwxr-xr-xtests/py/nft-test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index 1b7e04c9..3b89ec35 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -278,7 +278,9 @@ def chain_create(chain, table, filename):
print_error(reason, filename, chain.lineno)
return -1
- cmd = "add chain %s %s { %s; }" % (table, chain, chain.config)
+ cmd = "add chain %s %s" % (table, chain)
+ if chain.config:
+ cmd += " { %s; }" % chain.config
ret = execute_cmd(cmd, filename, chain.lineno)
if ret != 0: