Add enable/disable test
[one.git] / tests / data_plane / vpp_lite_topo / test_driver / resolver_failover.sh
1 source config.sh
2 source odl_utils.sh
3 source topologies/2_node_topo.sh
4
5 if [ "$1" == "clean" ] ; then
6   basic_two_odls_clean
7   exit 0
8 fi
9
10 if [[ $(id -u) != 0 ]]; then
11   echo "Error: run this as a root."
12   exit 1
13 fi
14
15 function test_resolver_failover
16 {
17   2_node_topo_setup no_odl
18
19   start_map_resolver "6.0.3.200"
20
21   test_result=1
22
23   maybe_pause
24
25   ip netns exec vppns1 "${1}" -w 20 -c 1 "${2}"
26   rc=$?
27
28   # test done
29   maybe_pause
30
31   2_node_topo_clean no_odl
32   kill $mr_id
33
34   print_status $rc "No ICMP response!"
35   exit $test_result
36 }