Add tests for listing ct timeout objects and input from file. Signed-off-by: Harsha Sharma <harshasharmaiitr@xxxxxxxxx> --- Changes : - Added more tests tests/shell/testcases/listing/0013objects_0 | 6 ++++++ tests/shell/testcases/nft-f/0017ct_timeout_obj_0 | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 tests/shell/testcases/nft-f/0017ct_timeout_obj_0 diff --git a/tests/shell/testcases/listing/0013objects_0 b/tests/shell/testcases/listing/0013objects_0 index c5e0e32..1a26953 100755 --- a/tests/shell/testcases/listing/0013objects_0 +++ b/tests/shell/testcases/listing/0013objects_0 @@ -12,6 +12,11 @@ EXPECTED="table ip test { l3proto ip } + ct timeout cttime { + protocol udp; + policy = {unreplied: 15, replied: 12} + } + chain input { } }" @@ -22,6 +27,7 @@ $NFT add table test $NFT add chain test input $NFT add quota test https-quota 25 mbytes $NFT add ct helper test cthelp { type \"sip\" protocol tcp \; } +$NFT add ct timeout test cttime { protocol udp \; policy = {replied: 12, unreplied: 15 } \; } $NFT add table test-ip GET="$($NFT list table test)" diff --git a/tests/shell/testcases/nft-f/0017ct_timeout_obj_0 b/tests/shell/testcases/nft-f/0017ct_timeout_obj_0 new file mode 100755 index 0000000..d69f287 --- /dev/null +++ b/tests/shell/testcases/nft-f/0017ct_timeout_obj_0 @@ -0,0 +1,15 @@ +#!/bin/bash + +EXPECTED='table ip filter { + ct timeout cttime{ + protocol tcp; + policy = {established: 123, close: 12} + } + + chain c { + ct timeout set "cttime" + } +}' + +set -e +$NFT -f - <<< $EXPECTED -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html