Case: run with route discovery

This commit is contained in:
Ivan Ilves 2017-05-27 09:36:18 +02:00
parent 3650bb3a37
commit c0b6c9c09d
2 changed files with 31 additions and 0 deletions

View File

@ -25,6 +25,7 @@ script:
- testing/run_integration_case.sh run_without_dns_propagation
- testing/run_integration_case.sh run_with_reconnection
- testing/run_integration_case.sh run_without_reconnection
- testing/run_integration_case.sh run_with_route_discovery
branches:
only:

View File

@ -0,0 +1,30 @@
INIT_DELAY=15
DOWN_DELAY=5
POST_DELAY=5
if [[ -f ${WD}/discover-routes ]]; then
mv ${WD}/discover-routes /tmp/discover-routes.orig
fi
echo '#!/bin/sh' >${WD}/discover-routes
echo 'echo ROUTE:10.42.42.42/32' >>${WD}/discover-routes
chmod +x ${WD}/discover-routes
${XIRI_EXE} -f 1 ${SSH_USER}@${REMOTE_IP} &
XIRI_PID=${!}; sleep ${INIT_DELAY}
warn "$(ip route | grep 10.42.42.42)"
if [[ -z "$(ip route | grep 10.42.42.42)" ]]; then
complain "Route not added by route discovery: 10.42.42.42/32"
exit 1
fi
rm ${WD}/discover-routes
if [[ -f /tmp/discover-routes.orig ]]; then
mv /tmp/discover-routes.orig ${WD}/discover-routes
fi
set +e
kill_reliably ${XIRI_PID} ${DOWN_DELAY}
set -e
sleep ${POST_DELAY}