Case: Run with reconnection

This commit is contained in:
Ivan Ilves 2017-05-26 23:28:15 +02:00
parent 20d6d7b179
commit 63e8a4d53c
3 changed files with 21 additions and 1 deletions

View File

@ -23,6 +23,7 @@ script:
- testing/run_integration_case.sh do_server_teardown
- testing/run_integration_case.sh run_with_dns_propagation
- testing/run_integration_case.sh run_without_dns_propagation
- testing/run_integration_case.sh run_with_reconnection
branches:
only:

View File

@ -0,0 +1,17 @@
INIT_DELAY=10
DOWN_DELAY=5
${XIRI_EXE} -f 1 -X ${SSH_USER}@${REMOTE_IP} 10.245.245.245/32 &
XIRI_PID=${!}; sleep ${INIT_DELAY}
docker restart xiri-${DIST}
sleep ${INIT_DELAY}
warn "$(ip route | grep 10.245.245.245)"
if [[ -z "$(ip route | grep 10.245.245.245)" ]]; then
complain "Routing not restored after reconnection!"
exit 1
fi
kill_reliably ${XIRI_PID} ${DOWN_DELAY}

View File

@ -46,7 +46,9 @@ function complain(){
function run_case(){
declare -r CASE=${1}
declare -r XIRI_EXE=../../xiringuito
pushd ../.. >/dev/null; WD=${PWD}; popd >/dev/null
declare -r XIRI_EXE=${WD}/xiringuito
declare -r SSH_USER=root
eval `ssh-agent -s`; ssh-add ssh-keys/id_rsa