From 58306b0f7e29c41c00ab7bbd99d7686299f1de77 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:34:55 +0200 Subject: Adding debian version 2.13.6-2. Signed-off-by: Daniel Baumann --- debian/tests/version | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 debian/tests/version (limited to 'debian/tests/version') diff --git a/debian/tests/version b/debian/tests/version new file mode 100644 index 0000000..67c93f2 --- /dev/null +++ b/debian/tests/version @@ -0,0 +1,18 @@ +#!/bin/bash +#-------------------- +#Testing for correct version +#-------------------- + +set -e + +PACKAGE_VERSION="$(dpkg-parsechangelog -S Version |sed -ne 's/^\(\([0-9]\+\):\)\?\(.*\)-.*/\3/p' )" +ICINGA_VERSION="$(icinga2 --version | grep version: | head -n1 | sed -e 's/.*version: r\([0-9.]\+\).*$/\1/')" + +if [ "$ICINGA_VERSION" = "$PACKAGE_VERSION" ] +then + echo "OK: $ICINGA_VERSION is equal to $PACKAGE_VERSION" + exit 0 +else + echo "ERROR: $ICINGA_VERSION is not equal to $PACKAGE_VERSION" + exit 1 +fi -- cgit v1.2.3