summaryrefslogtreecommitdiffstats
path: root/tests/monitor/testcases
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-10-11 17:48:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-15 13:37:51 +0200
commit90ed4fb3855f0d9d881b812c75e338e5e93081ba (patch)
tree7c039e162f93037d35497f5516c1e8a85c6cb7a7 /tests/monitor/testcases
parent62cea2e4ca9d6bc781ced6518810144a8d697275 (diff)
monitor: Fix printing of ct objects
Monitor output is supposed to be single lined without tabs, but ct object were printed with newlines and tabs hard-coded. Fixing this wasn't too hard given that there is 'stmt_separator' to also include semi-colons where required if newline was removed. A more obvious mistake was position of object type in monitor output: Like with other object types, it has to occur between command and table spec. As a positive side-effect, this aligns ct objects better with others (see obj_type_name_array for instance). Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/monitor/testcases')
-rw-r--r--tests/monitor/testcases/object.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/monitor/testcases/object.t b/tests/monitor/testcases/object.t
new file mode 100644
index 00000000..6695b0f0
--- /dev/null
+++ b/tests/monitor/testcases/object.t
@@ -0,0 +1,33 @@
+# first the setup
+I add table ip t
+O -
+
+I add counter ip t c
+O add counter ip t c { packets 0 bytes 0 }
+
+I delete counter ip t c
+O -
+
+I add quota ip t q 25 mbytes
+O add quota ip t q { 25 mbytes }
+
+I delete quota ip t q
+O -
+
+I add limit ip t l rate 1/second
+O add limit ip t l { rate 1/second }
+
+I delete limit ip t l
+O -
+
+I add ct helper ip t cth { type "sip" protocol tcp; l3proto ip; }
+O -
+
+I delete ct helper ip t cth
+O -
+
+I add ct timeout ip t ctt { protocol udp; l3proto ip; policy = { unreplied: 15, replied: 12 }; }
+O -
+
+I delete ct timeout ip t ctt
+O -