summaryrefslogtreecommitdiffstats
path: root/test/test_mpls.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-05-14 13:25:49 -0400
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-05-16 20:32:41 -0400
commit4271c971919bb8defa3ca54f4a362676cd57bfb2 (patch)
tree12fbe708b49f04dc5c088a2deefba0c451d95b64 /test/test_mpls.py
parentba65ca496af5766932a762bb99a758dbfcb580ec (diff)
tests: refactor. Replace literal constant w/ named constant.
* change literal packet count vlaues from 65 to a named constant of 67. (This value was recommended to exercise single, dual, and quad loops) Change-Id: Ieb1738dddacb8b6ea7fa25883032ac01a98399e1 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_mpls.py')
-rw-r--r--test/test_mpls.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_mpls.py b/test/test_mpls.py
index 2e0b71f3328..79f3204c53e 100644
--- a/test/test_mpls.py
+++ b/test/test_mpls.py
@@ -2014,7 +2014,7 @@ class TestMPLSL2(VppTestCase):
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
- tx0 = pcore * 65
+ tx0 = pcore * NUM_PKTS
rx0 = self.send_and_expect(self.pg0, tx0, self.pg1)
payload = pcore[MPLS].payload
@@ -2024,7 +2024,7 @@ class TestMPLSL2(VppTestCase):
#
# Inject a packet from the customer/L2 side
#
- tx1 = pcore[MPLS].payload * 65
+ tx1 = pcore[MPLS].payload * NUM_PKTS
rx1 = self.send_and_expect(self.pg1, tx1, self.pg0)
self.verify_capture_tunneled_ethernet(rx1, tx1, [VppMplsLabel(42)])
@@ -2100,13 +2100,13 @@ class TestMPLSL2(VppTestCase):
#
# now a stream in each direction
#
- self.pg1.add_stream(p_cust * 65)
+ self.pg1.add_stream(p_cust * NUM_PKTS)
self.pg_enable_capture(self.pg_interfaces)
self.pg_start()
- rx0 = self.pg0.get_capture(65)
+ rx0 = self.pg0.get_capture(NUM_PKTS)
- self.verify_capture_tunneled_ethernet(rx0, p_cust*65,
+ self.verify_capture_tunneled_ethernet(rx0, p_cust*NUM_PKTS,
[VppMplsLabel(42)])
#