aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_mpls.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-01-08 04:41:42 -0800
committerDave Wallace <dwallacelf@gmail.com>2018-01-09 17:01:21 +0000
commit2b97ac55edc5ba9fadf987d1c787102786ea8c4d (patch)
tree26d52dbbe7d6c748cac8e08aa2a801a3d16562d3 /test/test_mpls.py
parent12bf52bae2a608a34a73222dedbb5e4a441055c7 (diff)
test: consolidate the multiple versions of send_and_*
Change-Id: I7fa7d0ebf73dab8264a2e5ddbd412600d78ead05 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 52fae862646e25bac6d1cd11b9fc7ac77299bc25)
Diffstat (limited to 'test/test_mpls.py')
-rw-r--r--test/test_mpls.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/test/test_mpls.py b/test/test_mpls.py
index 9590519e237..aa5e67439b7 100644
--- a/test/test_mpls.py
+++ b/test/test_mpls.py
@@ -314,13 +314,6 @@ class TestMPLS(VppTestCase):
except:
raise
- def send_and_assert_no_replies(self, intf, pkts, remark):
- intf.add_stream(pkts)
- self.pg_enable_capture(self.pg_interfaces)
- self.pg_start()
- for i in self.pg_interfaces:
- i.assert_nothing_captured(remark=remark)
-
def test_swap(self):
""" MPLS label swap tests """
@@ -1218,7 +1211,13 @@ class TestMPLS(VppTestCase):
#
tx = self.create_stream_labelled_ip6(self.pg0, [34], 255,
dst_ip="ff01::1", hlim=1)
- self.send_and_assert_no_replies(self.pg0, tx, "Hop Limt Expired")
+ self.pg0.add_stream(tx)
+
+ self.pg_enable_capture(self.pg_interfaces)
+ self.pg_start()
+
+ rx = self.pg0.get_capture(257)
+ self.verify_capture_ip6_icmp(self.pg0, rx, tx)
#
# set the RPF-ID of the enrtry to not match the input packet's
@@ -1258,14 +1257,6 @@ class TestMPLSDisabled(VppTestCase):
self.pg0.disable_mpls()
super(TestMPLSDisabled, self).tearDown()
- def send_and_assert_no_replies(self, intf, pkts, remark):
- intf.add_stream(pkts)
- self.pg_enable_capture(self.pg_interfaces)
- self.pg_start()
- for i in self.pg_interfaces:
- i.get_capture(0)
- i.assert_nothing_captured(remark=remark)
-
def test_mpls_disabled(self):
""" MPLS Disabled """