diff --git a/.travis.yml b/.travis.yml index cf96a59..94d8eaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/testing/integration/cases/run_with_route_discovery.sh b/testing/integration/cases/run_with_route_discovery.sh index e69de29..49d354d 100644 --- a/testing/integration/cases/run_with_route_discovery.sh +++ b/testing/integration/cases/run_with_route_discovery.sh @@ -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}