From abd40b25d2ed413994e19699425964115ef49aa5 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 19 Jul 2017 15:05:29 +0200 Subject: tests: Add basic monitor testing framework This implements testing of 'nft monitor' output correctness and adds a number of testcases for named sets. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/monitor/testcases/set-mixed.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/monitor/testcases/set-mixed.t (limited to 'tests/monitor/testcases/set-mixed.t') diff --git a/tests/monitor/testcases/set-mixed.t b/tests/monitor/testcases/set-mixed.t new file mode 100644 index 00000000..c4699eda --- /dev/null +++ b/tests/monitor/testcases/set-mixed.t @@ -0,0 +1,19 @@ +# first the setup +I add table ip t +O add table ip t +I add set ip t portrange { type inet_service; flags interval; } +O add set ip t portrange { type inet_service;flags interval } +I add set ip t ports { type inet_service; } +O add set ip t ports { type inet_service;} + +# make sure concurrent adds work +I add element ip t portrange { 1024-65535 } +I add element ip t ports { 10 } +O add element ip t portrange { 1024-65535 } +O add element ip t ports { 10 } + +# delete items again +I delete element ip t portrange { 1024-65535 } +I delete element ip t ports { 10 } +O delete element ip t portrange { 1024-65535 } +O delete element ip t ports { 10 } -- cgit v1.2.3