2019-10-31 13:31:07 -05:00
|
|
|
#!/usr/bin/env python3
|
2016-12-08 19:48:11 +00:00
|
|
|
|
|
|
|
import unittest
|
|
|
|
|
2021-01-29 13:17:19 +00:00
|
|
|
from framework import tag_fixme_vpp_workers
|
2016-12-08 19:48:11 +00:00
|
|
|
from framework import VppTestCase, VppTestRunner
|
|
|
|
|
2016-12-12 02:55:06 +01:00
|
|
|
|
2021-01-29 13:17:19 +00:00
|
|
|
@tag_fixme_vpp_workers
|
2016-12-08 19:48:11 +00:00
|
|
|
class TestFIB(VppTestCase):
|
2022-04-26 19:02:15 +02:00
|
|
|
"""FIB Test Case"""
|
2016-12-08 19:48:11 +00:00
|
|
|
|
2019-03-12 19:23:27 -07:00
|
|
|
@classmethod
|
|
|
|
def setUpClass(cls):
|
|
|
|
super(TestFIB, cls).setUpClass()
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def tearDownClass(cls):
|
|
|
|
super(TestFIB, cls).tearDownClass()
|
|
|
|
|
2016-12-08 19:48:11 +00:00
|
|
|
def test_fib(self):
|
2022-04-26 19:02:15 +02:00
|
|
|
"""FIB Unit Tests"""
|
2016-12-08 19:48:11 +00:00
|
|
|
error = self.vapi.cli("test fib")
|
|
|
|
|
2019-12-04 06:11:00 +00:00
|
|
|
# shameless test of CLIs to bump lcov results...
|
|
|
|
# no i mean to ensure they don't crash
|
|
|
|
self.logger.info(self.vapi.cli("sh fib source"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib source prio"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib memory"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib entry"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib entry 0"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib entry 10000"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib entry-delegate"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib paths"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib paths 0"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib paths 10000"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib path-list"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib path-list 0"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib path-list 10000"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib walk"))
|
|
|
|
self.logger.info(self.vapi.cli("sh fib uRPF"))
|
|
|
|
|
2016-12-12 02:55:06 +01:00
|
|
|
if error:
|
|
|
|
self.logger.critical(error)
|
2019-03-06 15:11:28 -08:00
|
|
|
self.assertNotIn("Failed", error)
|
2016-12-08 19:48:11 +00:00
|
|
|
|
2022-04-26 19:02:15 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2016-12-08 19:48:11 +00:00
|
|
|
unittest.main(testRunner=VppTestRunner)
|