summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/test_driver
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/test_driver')
-rw-r--r--tests/data_plane/vpp_lite_topo/test_driver/basic.sh10
-rw-r--r--tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh15
-rw-r--r--tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh10
-rw-r--r--tests/data_plane/vpp_lite_topo/test_driver/basic_single_icmp.sh29
4 files changed, 46 insertions, 18 deletions
diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic.sh
index cd10d4c..88753bf 100644
--- a/tests/data_plane/vpp_lite_topo/test_driver/basic.sh
+++ b/tests/data_plane/vpp_lite_topo/test_driver/basic.sh
@@ -1,13 +1,13 @@
source config.sh
source odl_utils.sh
-source topologies/basic_topo.sh
+source topologies/2_node_topo.sh
ODL_CONFIG_FILE1="vpp1.json"
ODL_CONFIG_FILE2="vpp2.json"
ODL_CONFIG_FILE3="update_vpp2.json"
if [ "$1" == "clean" ] ; then
- basic_topo_clean
+ 2_node_topo_clean
exit 0
fi
@@ -19,14 +19,14 @@ fi
function test_basic
{
if [ "$3" != "no_setup" ] ; then
- basic_topo_setup
+ 2_node_topo_setup
fi
maybe_pause
test_result=1
ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
- assert_rc_ok $? basic_topo_clean "No ICMP response!"
+ assert_rc_ok $? 2_node_topo_clean "No ICMP response!"
maybe_pause
# change IP addresses of destination RLOC
@@ -42,7 +42,7 @@ function test_basic
# test done
maybe_pause
- basic_topo_clean
+ 2_node_topo_clean
print_status $rc "No ICMP response!"
exit $test_result
}
diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh
index 79456b7..ee24891 100644
--- a/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh
+++ b/tests/data_plane/vpp_lite_topo/test_driver/basic_multi_traffic.sh
@@ -1,13 +1,13 @@
source config.sh
source odl_utils.sh
-source topologies/basic_topo.sh
+source topologies/2_node_topo.sh
ODL_CONFIG_FILE1="vpp1.json"
ODL_CONFIG_FILE2="vpp2.json"
ODL_CONFIG_FILE3="update_vpp2.json"
if [ "$1" == "clean" ] ; then
- basic_topo_clean
+ 2_node_topo_clean
exit 0
fi
@@ -18,7 +18,7 @@ fi
function test_basic_multi_traffic
{
- basic_topo_setup
+ 2_node_topo_setup
# additional setup
ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4
@@ -30,10 +30,10 @@ function test_basic_multi_traffic
maybe_pause
ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
- assert_rc_ok $? basic_topo_clean "No response received!"
+ assert_rc_ok $? 2_node_topo_clean "No response received!"
ip netns exec vppns1 "${3}" -w 15 -c 1 "${4}"
- assert_rc_ok $? basic_topo_clean "No response received!"
+ assert_rc_ok $? 2_node_topo_clean "No response received!"
# change IP addresses of destination RLOC
echo "set int ip address del host-intervpp2 6.0.3.2/24" | nc 0 5003
@@ -49,7 +49,7 @@ function test_basic_multi_traffic
maybe_pause
ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
- assert_rc_ok $? basic_topo_clean "No response received!"
+ assert_rc_ok $? 2_node_topo_clean "No response received!"
ip netns exec vppns1 "${3}" -w 15 -c 1 "${4}"
rc=$?
@@ -57,9 +57,8 @@ function test_basic_multi_traffic
maybe_pause
# test done
- basic_topo_clean
+ 2_node_topo_clean
print_status $rc "No ICMP response!"
exit $test_result
}
-
diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh
index 6d06a16..9996111 100644
--- a/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh
+++ b/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh
@@ -1,9 +1,9 @@
source config.sh
source odl_utils.sh
-source topologies/basic_topo.sh
+source topologies/2_node_topo.sh
if [ "$1" == "clean" ] ; then
- basic_topo_clean
+ 2_node_topo_clean
exit 0
fi
@@ -14,7 +14,7 @@ fi
function test_basic_no_odl
{
- basic_topo_setup no_odl
+ 2_node_topo_setup no_odl
maybe_pause
@@ -23,7 +23,7 @@ function test_basic_no_odl
ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
if [ $? -ne 0 ] ; then
echo "No response received!"
- basic_topo_clean no_odl
+ 2_node_topo_clean no_odl
exit $test_result
fi
@@ -45,7 +45,7 @@ function test_basic_no_odl
# test done
- basic_topo_clean no_odl
+ 2_node_topo_clean no_odl
if [ $rc -ne 0 ] ; then
echo "Test failed: No ICMP response received within specified timeout limit!"
else
diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic_single_icmp.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic_single_icmp.sh
new file mode 100644
index 0000000..63c8b5a
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/test_driver/basic_single_icmp.sh
@@ -0,0 +1,29 @@
+source config.sh
+source topologies/2_node_topo.sh
+
+if [ "$1" == "clean" ] ; then
+ 2_node_topo_clean no_odl
+ exit 0
+fi
+
+if [[ $(id -u) != 0 ]]; then
+ echo "Error: run this as a root."
+ exit 1
+fi
+
+function test_single_icmp
+{
+ 2_node_topo_setup no_odl
+ maybe_pause
+ test_result=1
+
+ # send only one ping request
+ ip netns exec vppns1 "${1}" -c 1 "${2}"
+ rc=$?
+
+ # test done
+ maybe_pause
+ 2_node_topo_clean no_odl
+ print_status $rc "No ICMP response!"
+ exit $test_result
+}