summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorElias Rudberg <elias.rudberg@bahnhof.net>2020-12-10 14:20:43 +0100
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2020-12-10 18:34:18 +0000
commit7184571810d750001583763c11885ce6401e1c28 (patch)
tree6181cda470f0fb11a2662e1211441dbda8897dc5 /test
parent791c2061aedce4e7229be5bad6acee0a6e91e1a9 (diff)
tests: check ethernet type in arp test case
Add assertions to verify correct ethernet type field in ARP test case. Type: test Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net> Change-Id: I1d2671b0ab2b4dcb53dab4b54bf93578d6bc86a3
Diffstat (limited to 'test')
-rw-r--r--test/test_neighbor.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_neighbor.py b/test/test_neighbor.py
index 241479a1d30..f69a2634686 100644
--- a/test/test_neighbor.py
+++ b/test/test_neighbor.py
@@ -82,6 +82,7 @@ class ARPTestCase(VppTestCase):
ether = rx[Ether]
self.assertEqual(ether.dst, "ff:ff:ff:ff:ff:ff")
self.assertEqual(ether.src, smac)
+ self.assertEqual(ether.type, 0x0806)
arp = rx[ARP]
self.assertEqual(arp.hwtype, 1)
@@ -98,6 +99,7 @@ class ARPTestCase(VppTestCase):
ether = rx[Ether]
self.assertEqual(ether.dst, dmac)
self.assertEqual(ether.src, smac)
+ self.assertEqual(ether.type, 0x0806)
arp = rx[ARP]
self.assertEqual(arp.hwtype, 1)
@@ -132,6 +134,7 @@ class ARPTestCase(VppTestCase):
ether = rx[Ether]
self.assertEqual(ether.dst, dmac)
self.assertEqual(ether.src, smac)
+ self.assertEqual(ether.type, 0x0800)
ip = rx[IP]
self.assertEqual(ip.src, sip)
@@ -141,6 +144,7 @@ class ARPTestCase(VppTestCase):
ether = rx[Ether]
self.assertEqual(ether.dst, dmac)
self.assertEqual(ether.src, smac)
+ self.assertEqual(ether.type, 0x8847)
mpls = rx[MPLS]
self.assertTrue(mpls.label, label)