mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-28 04:50:23 -07:00
Case: run without DNS propagation
This commit is contained in:
parent
f49ad97aab
commit
20d6d7b179
@ -22,6 +22,7 @@ script:
|
||||
- testing/run_integration_case.sh do_client_teardown
|
||||
- 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
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
@ -0,0 +1,18 @@
|
||||
INIT_DELAY=20
|
||||
DOWN_DELAY=20
|
||||
|
||||
ORIG_RESOLV_CONF=$(cat /etc/resolv.conf)
|
||||
warn "${ORIG_RESOLV_CONF}"
|
||||
|
||||
${XIRI_EXE} -f 1 -X -R -D ${SSH_USER}@${REMOTE_IP} 10.245.245.245/32 &
|
||||
XIRI_PID=${!}; sleep ${INIT_DELAY}
|
||||
|
||||
NEW_RESOLV_CONF=$(cat /etc/resolv.conf)
|
||||
warn "${NEW_RESOLV_CONF}"
|
||||
|
||||
if [[ "${ORIG_RESOLV_CONF}" != "${NEW_RESOLV_CONF}" ]]; then
|
||||
complain "Should NOT update /etc/resolv.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
kill_reliably ${XIRI_PID} ${DOWN_DELAY}
|
@ -30,7 +30,13 @@ function kill_reliably(){
|
||||
}
|
||||
|
||||
function warn(){
|
||||
echo -e "\033[1;33m${@}\033[0m"
|
||||
local LC=$(echo "${@}" | wc -l)
|
||||
local CL=1
|
||||
|
||||
while [[ ${CL} -le ${LC} ]]; do
|
||||
echo -e "\033[1;33m$(echo "${@}" | head -n${CL} | tail -n1)\033[0m"
|
||||
let CL+=1
|
||||
done
|
||||
}
|
||||
|
||||
function complain(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user