diff options
Diffstat (limited to 'tests/check_extensions')
-rw-r--r-- | tests/check_extensions | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/check_extensions b/tests/check_extensions new file mode 100644 index 0000000..5848b38 --- /dev/null +++ b/tests/check_extensions @@ -0,0 +1,10 @@ +#!/bin/bash + +read ip t timeout p packets b bytes <<< $(../src/ipset l $1 | grep ^$2) +test -z "$timeout" -o -z "$packets" -o -z "$bytes" && exit 1 +test $timeout -gt $3 -o $timeout -lt $(($3 - 10)) && exit 1 +test $packets -ne $4 -o $bytes -ne $5 && exit 1 +exit 0 + + + |