blob: 31d94f8621604b89717d3be5f5a57546b74f9646 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/bash
# list only the object asked for with table
EXPECTED="table ip test {
quota https-quota {
25 mbytes
}
}"
set -e
$NFT add table test
$NFT add quota test https-quota 25 mbytes
$NFT add ct helper test cthelp { type \"sip\" protocol tcp \; }
$NFT add table test-ip
GET="$($NFT list quotas)"
if [ "$EXPECTED" != "$GET" ] ; then
$DIFF -u <(echo "$EXPECTED") <(echo "$GET")
exit 1
fi
GET="$($NFT list quota test https-quota)"
if [ "$EXPECTED" != "$GET" ] ; then
$DIFF -u <(echo "$EXPECTED") <(echo "$GET")
exit 1
fi
|