Fix src/dst test 80/4280/2
authorFilip Tehlar <ftehlar@cisco.com>
Wed, 14 Dec 2016 14:42:11 +0000 (15:42 +0100)
committerFilip Tehlar <ftehlar@cisco.com>
Wed, 14 Dec 2016 15:57:15 +0000 (16:57 +0100)
Change-Id: I354585028a0b6de99da978ec832b5c56fdba02a1
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
tests/data_plane/vpp_lite_topo/test_driver/src_dst_overwrite.sh

index e7bf1a2..1c0c507 100644 (file)
@@ -58,6 +58,50 @@ function test_src_dst_overwrite
 
   maybe_pause
 
+  # Replace ODL mapping with negative one
+  post_curl "add-mapping" "replace1.json"
+
+  # wait for SMR being resolved
+  sleep 2
+
+  maybe_pause
+
+  # now ping should fail
+  send_ping_from_ns_expect_failure vppns1 ${1} ${2}
+
+  maybe_pause
+
+  # Replace ODL mapping with positive one
+  post_curl "add-mapping" "replace2.json"
+
+  # wait for SMR being resolved
+  sleep 2
+
+  maybe_pause
+
+  # expect ping reply again
+  send_ping_from_ns vppns1 ${1} ${2}
+  rc=$?
+
+  maybe_pause
+  2_node_topo_clean
+  print_status $rc "No ICMP response!"
+  exit $test_result
+}
+
+function test_src_dst_overwrite_superset
+{
+  2_node_topo_setup
+
+  maybe_pause
+
+  test_result=1
+
+  # send ping request
+  send_ping_from_ns vppns1 ${1} ${2}
+
+  maybe_pause
+
   # Replace ODL mapping with negative one
   post_curl "add-mapping" "replace1.json"
   remove_sd_mapping "6.0.1.0/24" "6.0.2.0/24"
@@ -87,6 +131,6 @@ function test_src_dst_overwrite
 
   maybe_pause
   2_node_topo_clean
-  print_status $rc "No ICM response!"
+  print_status $rc "No ICMP response!"
   exit $test_result
 }