[expect] refactor common functions (#5634)

* unify node creating and destroying
* simplify switching between nodes
This commit is contained in:
Yakun Xu
2020-10-12 08:21:48 -07:00
committed by GitHub
parent c8ba04702c
commit 9e3b450218
42 changed files with 196 additions and 201 deletions
+4 -3
View File
@@ -30,8 +30,9 @@
source "tests/scripts/expect/_common.exp"
source "tests/scripts/expect/_multinode.exp"
setup_nodes
set spawn_id $spawn_1
setup_two_nodes
switch_node 1
send "leaderdata\n"
expect -re {Partition ID: \d+}
@@ -154,4 +155,4 @@ expect "0:0:0:0::/64 s low"
send "route remove ::/64\n"
expect "Done"
dispose_nodes
dispose_all