blob: 7c08722d8032e42eb942d360bc1692d3d94df5ed [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):
11 """ FIB Test Case """
12
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):
22 """ FIB Unit Tests """
23 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
47if __name__ == '__main__':
48 unittest.main(testRunner=VppTestRunner)