From 57ddd4f7851d6687682253702dd87b34daba1589 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 12 Jul 2013 19:32:27 +0100 Subject: [PATCH] tests: test small network alarm ignoring Signed-off-by: Sami Kerola --- tests/Makemodule.am | 1 + tests/alarm-ignore | 15 +++++++++++++++ tests/expected/alarm-ignore | 1 + 3 files changed, 17 insertions(+) create mode 100755 tests/alarm-ignore create mode 100644 tests/expected/alarm-ignore diff --git a/tests/Makemodule.am b/tests/Makemodule.am index 70ed8df..d309b9b 100644 --- a/tests/Makemodule.am +++ b/tests/Makemodule.am @@ -2,6 +2,7 @@ TESTS = \ tests/alarm-critical \ tests/alarm-critical-ranges \ tests/alarm-critical-snets \ + tests/alarm-ignore \ tests/alarm-ok \ tests/alarm-shared-ok \ tests/alarm-warning \ diff --git a/tests/alarm-ignore b/tests/alarm-ignore new file mode 100755 index 0000000..95bcf85 --- /dev/null +++ b/tests/alarm-ignore @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Minimal regression test suite. + +IAM=$(basename $0) + +if [ ! -d tests/outputs ]; then + mkdir tests/outputs +fi + +dhcpd-pools --warning 1 --critical 101 --min 2 \ + -c $top_srcdir/tests/confs/one-ip \ + -l $top_srcdir/tests/leases/one-ip -o tests/outputs/$IAM +diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM +exit $? diff --git a/tests/expected/alarm-ignore b/tests/expected/alarm-ignore new file mode 100644 index 0000000..18ca9c6 --- /dev/null +++ b/tests/expected/alarm-ignore @@ -0,0 +1 @@ +OK: Ranges; crit: 0 warn: 0 ok: 0 ignored: 1 Shared nets; crit: 0 warn: 0 ok: 0