mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Move reachability test from starting instances to dna protocol tests
This commit is contained in:
parent
7678ce8915
commit
be857316dc
@ -487,7 +487,7 @@ instances_see_each_other() {
|
||||
[ $I = $J ] && continue
|
||||
local logvar=LOG${I#+}
|
||||
local sidvar=SID${J#+}
|
||||
if ! grep "PEER REACHABLE, sid=${!sidvar}" "${!logvar}"; then
|
||||
if ! grep "ADD OVERLAY NODE sid=${!sidvar}" "${!logvar}"; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
@ -21,11 +21,23 @@
|
||||
source "${0%/*}/../testframework.sh"
|
||||
source "${0%/*}/../testdefs.sh"
|
||||
|
||||
is_reachable() {
|
||||
local sidvar=SID${1#+}
|
||||
if ! grep "PEER REACHABLE, sid=${!sidvar}" "$instance_servald_log"; then
|
||||
return 1
|
||||
fi
|
||||
echo "PEER REACHABLE, sid=${!sidvar} from $SID"
|
||||
return 0
|
||||
}
|
||||
|
||||
setup() {
|
||||
setup_servald
|
||||
assert_no_servald_processes
|
||||
start_servald_instances +A +B
|
||||
set_instance +B
|
||||
wait_until --sleep=0.25 is_reachable +A
|
||||
set_instance +A
|
||||
wait_until --sleep=0.25 is_reachable +B
|
||||
}
|
||||
|
||||
teardown() {
|
||||
@ -47,7 +59,7 @@ configure_servald_server() {
|
||||
executeOk_servald config set debug.mdprequests Yes
|
||||
}
|
||||
|
||||
doc_MultiServer="Start three servald servers with dummy interface"
|
||||
doc_MultiServer="Start three servald servers with dummy interfaces"
|
||||
setup_MultiServer() {
|
||||
setup_servald
|
||||
assert_no_servald_processes
|
||||
|
Loading…
Reference in New Issue
Block a user