blob: 0eefcdf8b80961b8a82e9d9e9d8adc66ec878091 [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
5from framework import VppTestCase, VppTestRunner
6
Klement Sekera1a419f22016-12-12 02:55:06 +01007
Neale Ranns0ebe8d72016-12-08 19:48:11 +00008class TestFIB(VppTestCase):
9 """ FIB Test Case """
10
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -070011 @classmethod
12 def setUpClass(cls):
13 super(TestFIB, cls).setUpClass()
14
15 @classmethod
16 def tearDownClass(cls):
17 super(TestFIB, cls).tearDownClass()
18
Neale Ranns0ebe8d72016-12-08 19:48:11 +000019 def test_fib(self):
20 """ FIB Unit Tests """
21 error = self.vapi.cli("test fib")
22
Neale Ranns3bab8f92019-12-04 06:11:00 +000023 # shameless test of CLIs to bump lcov results...
24 # no i mean to ensure they don't crash
25 self.logger.info(self.vapi.cli("sh fib source"))
26 self.logger.info(self.vapi.cli("sh fib source prio"))
27 self.logger.info(self.vapi.cli("sh fib memory"))
28 self.logger.info(self.vapi.cli("sh fib entry"))
29 self.logger.info(self.vapi.cli("sh fib entry 0"))
30 self.logger.info(self.vapi.cli("sh fib entry 10000"))
31 self.logger.info(self.vapi.cli("sh fib entry-delegate"))
32 self.logger.info(self.vapi.cli("sh fib paths"))
33 self.logger.info(self.vapi.cli("sh fib paths 0"))
34 self.logger.info(self.vapi.cli("sh fib paths 10000"))
35 self.logger.info(self.vapi.cli("sh fib path-list"))
36 self.logger.info(self.vapi.cli("sh fib path-list 0"))
37 self.logger.info(self.vapi.cli("sh fib path-list 10000"))
38 self.logger.info(self.vapi.cli("sh fib walk"))
39 self.logger.info(self.vapi.cli("sh fib uRPF"))
40
Klement Sekera1a419f22016-12-12 02:55:06 +010041 if error:
42 self.logger.critical(error)
Paul Vinciguerra9a6dafd2019-03-06 15:11:28 -080043 self.assertNotIn("Failed", error)
Neale Ranns0ebe8d72016-12-08 19:48:11 +000044
45if __name__ == '__main__':
46 unittest.main(testRunner=VppTestRunner)