Debian Codegraph @

tests/shell/testcases/optionals/update_object_handles_0

raw
1 #!/bin/bash
2
3 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_stateful_object_update)
4
5 set -e
6 $NFT add table test-ip
7 $NFT add counter test-ip traffic-counter
8 $NFT add counter test-ip traffic-counter
9 $NFT add quota test-ip traffic-quota 25 mbytes
10 $NFT add quota test-ip traffic-quota 50 mbytes
11
12 EXPECTED="table ip test-ip {
13 counter traffic-counter {
14 packets 0 bytes 0
15 }
16
17 quota traffic-quota {
18 50 mbytes
19 }
20 }"
21
22 GET="$($NFT list ruleset)"
23 if [ "$EXPECTED" != "$GET" ] ; then
24 $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
25 exit 1
26 fi