blob: 136918e12329043318a2c7473df0bed5b1230d67 [file] [log] [blame]
Renato Botelho do Coutoead1e532019-10-31 13:31:07 -05001#!/usr/bin/env python3
Neale Ranns0ebe8d72016-12-08 19:48:11 +00002
3import unittest
4
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +00005from framework import tag_fixme_vpp_workers
Neale Ranns0ebe8d72016-12-08 19:48:11 +00006from framework import VppTestCase, VppTestRunner
7
Klement Sekera1a419f22016-12-12 02:55:06 +01008
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +00009@tag_fixme_vpp_workers
Neale Ranns0ebe8d72016-12-08 19:48:11 +000010class TestFIB(VppTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020011 """FIB Test Case"""
Neale Ranns0ebe8d72016-12-08 19:48:11 +000012
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -070013 @classmethod
14 def setUpClass(cls):
15 super(TestFIB, cls).setUpClass()
16
17 @classmethod
18 def tearDownClass(cls):
19 super(TestFIB, cls).tearDownClass()
20
Neale Ranns0ebe8d72016-12-08 19:48:11 +000021 def test_fib(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020022 """FIB Unit Tests"""
Neale Ranns0ebe8d72016-12-08 19:48:11 +000023 error = self.vapi.cli("test fib")
24
Neale Ranns3bab8f92019-12-04 06:11:00 +000025 # shameless test of CLIs to bump lcov results...
26 # no i mean to ensure they don't crash
27 self.logger.info(self.vapi.cli("sh fib source"))
28 self.logger.info(self.vapi.cli("sh fib source prio"))
29 self.logger.info(self.vapi.cli("sh fib memory"))
30 self.logger.info(self.vapi.cli("sh fib entry"))
31 self.logger.info(self.vapi.cli("sh fib entry 0"))
32 self.logger.info(self.vapi.cli("sh fib entry 10000"))
33 self.logger.info(self.vapi.cli("sh fib entry-delegate"))
34 self.logger.info(self.vapi.cli("sh fib paths"))
35 self.logger.info(self.vapi.cli("sh fib paths 0"))
36 self.logger.info(self.vapi.cli("sh fib paths 10000"))
37 self.logger.info(self.vapi.cli("sh fib path-list"))
38 self.logger.info(self.vapi.cli("sh fib path-list 0"))
39 self.logger.info(self.vapi.cli("sh fib path-list 10000"))
40 self.logger.info(self.vapi.cli("sh fib walk"))
41 self.logger.info(self.vapi.cli("sh fib uRPF"))
42
Klement Sekera1a419f22016-12-12 02:55:06 +010043 if error:
44 self.logger.critical(error)
Paul Vinciguerra9a6dafd2019-03-06 15:11:28 -080045 self.assertNotIn("Failed", error)
Neale Ranns0ebe8d72016-12-08 19:48:11 +000046
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020047
48if __name__ == "__main__":
Neale Ranns0ebe8d72016-12-08 19:48:11 +000049 unittest.main(testRunner=VppTestRunner)