mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-20 01:00:13 -07:00
Case: run with route discovery
This commit is contained in:
parent
3650bb3a37
commit
c0b6c9c09d
@ -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:
|
||||
|
@ -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}
|
Loading…
x
Reference in New Issue
Block a user