Renato Botelho do Couto | ead1e53 | 2019-10-31 13:31:07 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Neale Ranns | 0ebe8d7 | 2016-12-08 19:48:11 +0000 | [diff] [blame] | 2 | |
| 3 | import unittest |
| 4 | |
| 5 | from framework import VppTestCase, VppTestRunner |
| 6 | |
Klement Sekera | 1a419f2 | 2016-12-12 02:55:06 +0100 | [diff] [blame] | 7 | |
Neale Ranns | 0ebe8d7 | 2016-12-08 19:48:11 +0000 | [diff] [blame] | 8 | class TestFIB(VppTestCase): |
| 9 | """ FIB Test Case """ |
| 10 | |
Paul Vinciguerra | 7f9b7f9 | 2019-03-12 19:23:27 -0700 | [diff] [blame] | 11 | @classmethod |
| 12 | def setUpClass(cls): |
| 13 | super(TestFIB, cls).setUpClass() |
| 14 | |
| 15 | @classmethod |
| 16 | def tearDownClass(cls): |
| 17 | super(TestFIB, cls).tearDownClass() |
| 18 | |
Neale Ranns | 0ebe8d7 | 2016-12-08 19:48:11 +0000 | [diff] [blame] | 19 | def test_fib(self): |
| 20 | """ FIB Unit Tests """ |
| 21 | error = self.vapi.cli("test fib") |
| 22 | |
Neale Ranns | 3bab8f9 | 2019-12-04 06:11:00 +0000 | [diff] [blame] | 23 | # 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 Sekera | 1a419f2 | 2016-12-12 02:55:06 +0100 | [diff] [blame] | 41 | if error: |
| 42 | self.logger.critical(error) |
Paul Vinciguerra | 9a6dafd | 2019-03-06 15:11:28 -0800 | [diff] [blame] | 43 | self.assertNotIn("Failed", error) |
Neale Ranns | 0ebe8d7 | 2016-12-08 19:48:11 +0000 | [diff] [blame] | 44 | |
| 45 | if __name__ == '__main__': |
| 46 | unittest.main(testRunner=VppTestRunner) |