if cyphernode tests fail, stop the stack and don't show the "visit local url"-message

This commit is contained in:
jash
2018-12-23 17:45:47 +01:00
committed by kexkey
parent 686c874f52
commit fb33e1cd2c
2 changed files with 16 additions and 1 deletions

View File

@@ -30,9 +30,22 @@ esac
# Will test if Cyphernode is fully up and running...
docker run --rm -it -v $current_path/testfeatures.sh:/testfeatures.sh \
-v <%= gatekeeper_datapath %>:/gatekeeper \
-v ~/.cyphernode/gatekeeper:/gatekeeper \
-v $current_path/exitStatus.sh:/exitStatus.sh \
--network cyphernodenet alpine:3.8 /testfeatures.sh
if [[ -f $current_path/exitStatus.sh ]]; then
. $current_path/exitStatus.sh
rm $current_path/exitStatus.sh
fi
if [[ ! $EXIT_STATUS == 0 ]]; then
exec ./stop.sh
exit 1
fi
printf "\r\n\033[0;92mDepending on your current location and DNS settings, point your favorite browser to one of the following URLs to access Cyphernode's status page:\r\n"
printf "\r\n"
printf "\033[0;95m<% cns.forEach(cn => { %><%= ('https://' + cn + '/status/\\r\\n') %><% }) %>\033[0m\r\n"

View File

@@ -313,3 +313,5 @@ result="{${result}]}"
echo "${result}" > /gatekeeper/installation.json
echo -e "\r\n\e[1;32mTests finished.\e[0m" > /dev/console
echo "EXIT_STATUS=${returncode}" > /exitStatus.sh