Revert "API: Cleanup APIs interface.api"
[vpp.git] / test / test_cdp.py
index ac42bf0..1996c51 100644 (file)
@@ -71,6 +71,10 @@ class TestCDP(VppTestCase):
             super(TestCDP, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestCDP, cls).tearDownClass()
+
     def test_enable_cdp(self):
         self.logger.info(self.vapi.cli("cdp enable"))
         ret = self.vapi.cli("show cdp")
@@ -86,9 +90,10 @@ class TestCDP(VppTestCase):
         self.assertTrue(neighbors, "CDP didn't register neighbor")
 
         port, system = neighbors[0]
+        length = min(len(system), len(self.device_id))
 
         self.assert_equal(port, self.port_id, "CDP received invalid port id")
-        self.assert_equal(system, self.device_id,
+        self.assert_equal(system[:length], self.device_id[:length],
                           "CDP received invalid device id")
 
     def test_cdp_underflow_tlv(self):