diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/testcases/listing/0017objects_0 | 19 | ||||
-rwxr-xr-x | tests/shell/testcases/listing/0018data_0 | 19 | ||||
-rwxr-xr-x | tests/shell/testcases/listing/0019set_0 | 19 |
3 files changed, 57 insertions, 0 deletions
diff --git a/tests/shell/testcases/listing/0017objects_0 b/tests/shell/testcases/listing/0017objects_0 new file mode 100755 index 00000000..14d61438 --- /dev/null +++ b/tests/shell/testcases/listing/0017objects_0 @@ -0,0 +1,19 @@ +#!/bin/bash + +EXPECTED="table inet filter { + map countermap { + type ipv4_addr : counter + } +}" + +set -e + +$NFT -f - <<< $EXPECTED +$NFT flush map inet filter countermap + +GET="$($NFT list map inet filter countermap)" +if [ "$EXPECTED" != "$GET" ] ; then + DIFF="$(which diff)" + [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET") + exit 1 +fi diff --git a/tests/shell/testcases/listing/0018data_0 b/tests/shell/testcases/listing/0018data_0 new file mode 100755 index 00000000..767fe13a --- /dev/null +++ b/tests/shell/testcases/listing/0018data_0 @@ -0,0 +1,19 @@ +#!/bin/bash + +EXPECTED="table inet filter { + map ipmap { + type ipv4_addr : ipv4_addr + } +}" + +set -e + +$NFT -f - <<< $EXPECTED +$NFT flush map inet filter ipmap + +GET="$($NFT list map inet filter ipmap)" +if [ "$EXPECTED" != "$GET" ] ; then + DIFF="$(which diff)" + [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET") + exit 1 +fi diff --git a/tests/shell/testcases/listing/0019set_0 b/tests/shell/testcases/listing/0019set_0 new file mode 100755 index 00000000..04eb0faf --- /dev/null +++ b/tests/shell/testcases/listing/0019set_0 @@ -0,0 +1,19 @@ +#!/bin/bash + +EXPECTED="table inet filter { + set ipset { + type ipv4_addr + } +}" + +set -e + +$NFT -f - <<< $EXPECTED +$NFT flush set inet filter ipset + +GET="$($NFT list set inet filter ipset)" +if [ "$EXPECTED" != "$GET" ] ; then + DIFF="$(which diff)" + [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET") + exit 1 +fi |