diff options
author | Aleš Mrázek <ales.mrazek@nic.cz> | 2025-01-06 16:23:27 +0100 |
---|---|---|
committer | Aleš Mrázek <ales.mrazek@nic.cz> | 2025-01-14 10:03:29 +0100 |
commit | 538b72db8e19b3e4238260636738104f523387d8 (patch) | |
tree | 31d204918568543d6814ab4f688fddd55925802b | |
parent | datamodel: network: tls: added 'files-watchdog' option (diff) | |
download | knot-resolver-538b72db8e19b3e4238260636738104f523387d8.tar.xz knot-resolver-538b72db8e19b3e4238260636738104f523387d8.zip |
tests/packaging/interactive/watchdog.sh: updated with 'files-watchdog' config
-rwxr-xr-x | tests/packaging/interactive/watchdog.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/packaging/interactive/watchdog.sh b/tests/packaging/interactive/watchdog.sh index 6e5e506a..ffc76e92 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 |