blob: 9d391f57ed1b944fd358bfd71c466d946350ec8b [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
Dave Wallace8800f732023-08-31 00:47:44 -04005from asfframework import VppAsfTestCase, VppTestRunner, tag_fixme_vpp_workers
Neale Ranns0ebe8d72016-12-08 19:48:11 +00006
Klement Sekera1a419f22016-12-12 02:55:06 +01007
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +00008@tag_fixme_vpp_workers
Dave Wallace8800f732023-08-31 00:47:44 -04009class TestFIB(VppAsfTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020010 """FIB Test Case"""
Neale Ranns0ebe8d72016-12-08 19:48:11 +000011
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -070012 @classmethod
13 def setUpClass(cls):
14 super(TestFIB, cls).setUpClass()
15
16 @classmethod
17 def tearDownClass(cls):
18 super(TestFIB, cls).tearDownClass()
19
Neale Ranns0ebe8d72016-12-08 19:48:11 +000020 def test_fib(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020021 """FIB Unit Tests"""
Neale Ranns0ebe8d72016-12-08 19:48:11 +000022 error = self.vapi.cli("test fib")
23
Neale Ranns3bab8f92019-12-04 06:11:00 +000024 # shameless test of CLIs to bump lcov results...
25 # no i mean to ensure they don't crash
26 self.logger.info(self.vapi.cli("sh fib source"))
27 self.logger.info(self.vapi.cli("sh fib source prio"))
28 self.logger.info(self.vapi.cli("sh fib memory"))
29 self.logger.info(self.vapi.cli("sh fib entry"))
30 self.logger.info(self.vapi.cli("sh fib entry 0"))
31 self.logger.info(self.vapi.cli("sh fib entry 10000"))
32 self.logger.info(self.vapi.cli("sh fib entry-delegate"))
33 self.logger.info(self.vapi.cli("sh fib paths"))
34 self.logger.info(self.vapi.cli("sh fib paths 0"))
35 self.logger.info(self.vapi.cli("sh fib paths 10000"))
36 self.logger.info(self.vapi.cli("sh fib path-list"))
37 self.logger.info(self.vapi.cli("sh fib path-list 0"))
38 self.logger.info(self.vapi.cli("sh fib path-list 10000"))
39 self.logger.info(self.vapi.cli("sh fib walk"))
40 self.logger.info(self.vapi.cli("sh fib uRPF"))
41
Klement Sekera1a419f22016-12-12 02:55:06 +010042 if error:
43 self.logger.critical(error)
Paul Vinciguerra9a6dafd2019-03-06 15:11:28 -080044 self.assertNotIn("Failed", error)
Neale Ranns0ebe8d72016-12-08 19:48:11 +000045
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020046
47if __name__ == "__main__":
Neale Ranns0ebe8d72016-12-08 19:48:11 +000048 unittest.main(testRunner=VppTestRunner)