From: Aleš Mrázek Date: Mon, 6 Jan 2025 15:23:27 +0000 (+0100) Subject: tests/packaging/interactive/watchdog.sh: updated with 'files-watchdog' config X-Git-Tag: v6.0.10~4^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=538b72db8e19b3e4238260636738104f523387d8;p=thirdparty%2Fknot-resolver.git tests/packaging/interactive/watchdog.sh: updated with 'files-watchdog' config --- diff --git a/tests/packaging/interactive/watchdog.sh b/tests/packaging/interactive/watchdog.sh index 6e5e506a7..ffc76e921 100755 --- a/tests/packaging/interactive/watchdog.sh +++ b/tests/packaging/interactive/watchdog.sh @@ -29,11 +29,31 @@ function count_reloads(){ echo "$(journalctl -u knot-resolver.service | grep -c "Reloading of TLS certificate files has finished")" } +# test that files watchdog is turned off +# {{ + +err_count=$(count_errors) +rel_count=$(count_reloads) +sleep 6 + +if [ $(count_errors) -ne $err_count ] || [ $(count_reloads) -ne $rel_count ]; then + echo "TLS certificate files watchdog is running (should not) or other errors occurred." + exit 1 +fi + +# }} + +# configure TLS certificate files and turn on watchdog +kresctl config set -p /network/tls/files-watchdog true +if [ "$?" -ne "0" ]; then + echo "Could not turn on TLS certificate files watchdog." + exit 1 +fi + # test modification # {{ # modify certificate files with '-', it will trigger reload -err_count=$(count_errors) rel_count=$(count_reloads) echo "-----------" >> $cert_file echo "-----------" >> $key_file