-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manager/tests/packaging: More verbose systemd_service tests
- Loading branch information
Oto Šťáva
committed
Jan 18, 2024
1 parent
303a2af
commit 1713198
Showing
4 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/bash | ||
|
||
curl --silent --fail --unix-socket /var/run/knot-resolver/manager.sock http://localhost/metrics > /dev/null | ||
set -e | ||
|
||
curl --silent --fail --unix-socket /var/run/knot-resolver/manager.sock http://localhost/metrics > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
expected_workers="5" | ||
|
||
kresctl config set -p /workers 5 | ||
kresctl config set -p /workers "$expected_workers" | ||
if [ "$?" -ne "0" ]; then | ||
echo "Could not configure $expected_workers workers" | ||
exit 1 | ||
fi | ||
|
||
test "$(ps -a -x | grep kresd | grep -v grep | wc -l)" -eq 5 | ||
ps_result="$(ps -a -x | grep kresd | grep -v grep)" | ||
actual_processes="$(echo "$ps_result" | wc -l)" | ||
if [ "$actual_processes" -ne "$expected_workers" ]; then | ||
echo "Incorrect number of workers" | ||
echo "Found workers:" | ||
echo "$ps_result" | ||
echo "" | ||
echo "(actual) != (expected)" | ||
echo "$actual_processes != $expected_workers" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters