tests: move test source to vpp/test
[vpp.git] / test / test_fib.py
1 #!/usr/bin/env python3
2
3 import unittest
4
5 from framework import tag_fixme_vpp_workers
6 from framework import VppTestCase, VppTestRunner
7
8
9 @tag_fixme_vpp_workers
10 class TestFIB(VppTestCase):
11     """ FIB Test Case """
12
13     @classmethod
14     def setUpClass(cls):
15         super(TestFIB, cls).setUpClass()
16
17     @classmethod
18     def tearDownClass(cls):
19         super(TestFIB, cls).tearDownClass()
20
21     def test_fib(self):
22         """ FIB Unit Tests """
23         error = self.vapi.cli("test fib")
24
25         # 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
43         if error:
44             self.logger.critical(error)
45         self.assertNotIn("Failed", error)
46
47 if __name__ == '__main__':
48     unittest.main(testRunner=VppTestRunner)