Skip to content

Commit

Permalink
fixup! tests/packaging/interactive: added watchdog test
Browse files Browse the repository at this point in the history
  • Loading branch information
alesmrazek committed Nov 29, 2024
1 parent 4b84146 commit 2917c21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/packaging/interactive/watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ "$?" -ne "0" ]; then
fi

function count_errors(){
echo "$(journalctl -u knot-resolver.service | grep -c ERROR)"
echo "$(journalctl -u knot-resolver.service | grep -c error)"
}

function count_reloads(){
Expand All @@ -39,7 +39,7 @@ echo "-----------" >> $cert_file
echo "-----------" >> $key_file

# wait for files reload to finish
sleep 6
sleep 10

if [ $(count_errors) -ne $err_count ] || [ $(count_reloads) -gt $rel_count ]; then
echo "Could not reload modified TLS certificate files."
Expand All @@ -66,7 +66,7 @@ mv -f test.crt.new $cert_file
mv -f test.key.new $key_file

# wait for files reload to finish
sleep 6
sleep 10

if [ $(count_errors) -ne $err_count ] || [ $(count_reloads) -gt $rel_count ]; then
echo "Could not reload replaced TLS certificate files."
Expand All @@ -92,7 +92,7 @@ mv test.crt.backup $cert_file
mv test.key.backup $key_file

# wait for files reload to finish
sleep 6
sleep 10

if [ $(count_errors) -ne $err_count ] || [ $(count_reloads) -gt $rel_count ]; then
echo "Could not reload created TLS certificate files."
Expand Down

0 comments on commit 2917c21

Please sign in to comment.