dhcpd-pools/tests/test.sh
Sami Kerola d8aae53968 tests: add json tests, and make fail output loud
Gilles reported the full-json is currently broken, which the new check
demonstrates.  Luckily the issue occurs only when active leases details
are being queried, leaving the count to be correct.  That said bug is a
bug, and that should be corrected.

Reported-by: Gilles Bouthenot <gilles.bouthenot@univ-fcomte.fr>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-07 20:25:21 +00:00

15 lines
310 B
Bash
Executable file

#!/bin/sh
#
# Minimal regression test suite.
TEST_TOPDIR=$(cd $(dirname $0) && pwd)
IAM=$(basename $0)
DHCPD_POOLS=$(readlink -f $TEST_TOPDIR/../src/dhcpd-pools)
if [ ! -d outputs ]; then
mkdir outputs
fi
$DHCPD_POOLS -c confs/$IAM -l leases/$IAM -o outputs/$IAM
diff -u expected/$IAM outputs/$IAM
exit $?