Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pedro Pombeiro
committed
Nov 19, 2018
1 parent
5b2d7dc
commit 51cc7d5
Showing
5 changed files
with
34 additions
and
7 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
json_path='.ClusterConfig.TrustedMailServers' | ||
mailservers=$(jq -r "${json_path} | .[]" $1) | ||
count=$(jq -r "${json_path} | length" $1) | ||
|
||
echo "Will test ${count} mailservers..." | ||
failed_count=0 | ||
|
||
while read -r mailserver; do | ||
echo "Testing $mailserver ..." | ||
./build/bin/node-canary -log=ERROR -log-without-color=true -mailserver $mailserver || failed_count=$((failed_count + 1)) | ||
done <<< "$mailservers" | ||
|
||
if [ $failed_count -gt 0 ]; then | ||
echo "${failed_count}/${count} mailservers failed the test" | ||
exit 1 | ||
else | ||
echo "All mailservers replied correctly" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
if [ -x "$(command -v apt)" ]; then | ||
apt install -y protobuf-compiler | ||
apt install -y protobuf-compiler jq | ||
fi | ||
|
||
if [ -x "$(command -v pacman)" ]; then | ||
pacman -Sy protobuf --noconfirm | ||
pacman -Sy protobuf jq --noconfirm | ||
fi | ||
|
||
if [ -x "$(command -v brew)" ]; then | ||
brew install protobuf | ||
brew install protobuf jq | ||
fi |