summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0028delete_handle_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/sets/0028delete_handle_0')
-rwxr-xr-xtests/shell/testcases/sets/0028delete_handle_012
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/shell/testcases/sets/0028delete_handle_0 b/tests/shell/testcases/sets/0028delete_handle_0
index 215323ce..626d51bc 100755
--- a/tests/shell/testcases/sets/0028delete_handle_0
+++ b/tests/shell/testcases/sets/0028delete_handle_0
@@ -2,11 +2,13 @@
set -e
$NFT add table test-ip
-$NFT add set test-ip x { type ipv4_addr\; } # should have handle 1
-$NFT add set test-ip y { type inet_service \; timeout 3h45s \;} # should have handle 2
-$NFT add set test-ip z { type ipv4_addr\; flags constant , interval\;} # should have handle 3
-$NFT add set test-ip c {type ipv4_addr \; flags timeout \; elements={192.168.1.1 timeout 10s, 192.168.1.2 timeout 30s} \;} #should have handle 4
-$NFT delete set test-ip handle 4
+$NFT add set test-ip x { type ipv4_addr\; }
+$NFT add set test-ip y { type inet_service \; timeout 3h45s \;}
+$NFT add set test-ip z { type ipv4_addr\; flags constant , interval\;}
+$NFT add set test-ip c {type ipv4_addr \; flags timeout \; elements={192.168.1.1 timeout 10s, 192.168.1.2 timeout 30s} \;}
+
+set_handle=$($NFT list ruleset -a | awk '/set\ c/{print $NF}')
+$NFT delete set test-ip handle $set_handle
EXPECTED="table ip test-ip {
set x {