mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
Add error condition checks. Add lease file binding states. Check all output formats. Check leases file that is in mad order, cse all sorting methods when checking this. Use json output to check status classfications. Add cidr range checks. Add conf include and comment parsing input checks. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
30 lines
715 B
Bash
Executable file
30 lines
715 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Minimal regression test suite.
|
|
|
|
IAM=$(basename $0)
|
|
|
|
if [ ! -d tests/outputs ]; then
|
|
mkdir tests/outputs
|
|
fi
|
|
cat <<EOF >"./${IAM}-conf"
|
|
#shared-network "example3 " {
|
|
# subnet 10.0.6.0 netmask 255.255.255.0 {
|
|
# pool {
|
|
# range 10.0.6.1 10.0.6.20;
|
|
# }
|
|
# }
|
|
# subnet 10.1.7.0 netmask 255.255.255.0 {
|
|
# pool {
|
|
# range 10.1.7.1 10.1.7.20;
|
|
# }
|
|
# }
|
|
#}
|
|
|
|
include "tests/confs/complete";
|
|
EOF
|
|
dhcpd-pools -c "./${IAM}-conf" --color=never \
|
|
-l $top_srcdir/tests/leases/$IAM -o tests/outputs/$IAM
|
|
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
|
rm -f "./${IAM}-conf"
|
|
exit $?
|