From 7184571810d750001583763c11885ce6401e1c28 Mon Sep 17 00:00:00 2001 From: Elias Rudberg Date: Thu, 10 Dec 2020 14:20:43 +0100 Subject: 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 Change-Id: I1d2671b0ab2b4dcb53dab4b54bf93578d6bc86a3 --- test/test_neighbor.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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) -- cgit 1.2.3-korg