summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0005ruleset_ip_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/listing/0005ruleset_ip_0')
-rwxr-xr-xtests/shell/testcases/listing/0005ruleset_ip_021
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/shell/testcases/listing/0005ruleset_ip_0 b/tests/shell/testcases/listing/0005ruleset_ip_0
new file mode 100755
index 00000000..c3266806
--- /dev/null
+++ b/tests/shell/testcases/listing/0005ruleset_ip_0
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# listing ruleset per family
+
+EXPECTED="table ip test {
+}"
+
+set -e
+
+$NFT add table ip test
+$NFT add table ip6 test
+$NFT add table inet test
+$NFT add table arp test
+$NFT add table bridge test
+
+GET="$($NFT list ruleset ip)"
+if [ "$EXPECTED" != "$GET" ] ; then
+ DIFF="$(which diff)"
+ [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
+ exit 1
+fi