Skip to content

Commit

Permalink
Added Syncthing test
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaang committed Oct 3, 2019
1 parent 89634a3 commit 4af6b09
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions tests/syncthing/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

source wdpk/$PACKAGE/env

serverReachable() {
return $(nc -z $TARGET $PORT)
}

count=0
until serverReachable
do
if [ $count -le 50 ]
then
echo "Waiting for server..."
sleep 1
count=$(( $count + 1 ))
else
echo "Server not reachable"
break
exit 1
fi
done
echo "Server reachable!"

4 changes: 2 additions & 2 deletions tests/tautulli/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ serverReachable() {
}

count=0
until serverReachable
until serverReachable
do
if [ $count -le 50 ]
then
Expand All @@ -17,7 +17,7 @@ do
else
echo "Server not reachable"
break
#exit 1
exit 1
fi
done
echo "Server reachable!"
Expand Down

0 comments on commit 4af6b09

Please sign in to comment.