summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0014objects_0
blob: dcfe2e6f809478d7a864e9a5245972aef5233a46 (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
#!/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 quota test https-quota)"
if [ "$EXPECTED" != "$GET" ] ; then
	DIFF="$(which diff)"
	[ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
	exit 1
fi