blob: 6ccf6c25123ea7734547ba1dde8604089055a4f5 [file] [log] [blame]
Dave Barach8b5dc4f2018-07-23 18:00:54 -04001#!/usr/bin/env python
2
3import unittest
4
5from framework import VppTestCase, VppTestRunner
6from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
7
8
juraj.linkes8e26f6d2018-09-19 14:59:43 +02009class TestBihash(VppTestCase):
Dave Barach8b5dc4f2018-07-23 18:00:54 -040010 """ Bihash Test Cases """
11
12 @classmethod
13 def setUpClass(cls):
juraj.linkes8e26f6d2018-09-19 14:59:43 +020014 super(TestBihash, cls).setUpClass()
Dave Barach8b5dc4f2018-07-23 18:00:54 -040015
16 def setUp(self):
juraj.linkes8e26f6d2018-09-19 14:59:43 +020017 super(TestBihash, self).setUp()
Dave Barach8b5dc4f2018-07-23 18:00:54 -040018
19 def tearDown(self):
juraj.linkes8e26f6d2018-09-19 14:59:43 +020020 super(TestBihash, self).tearDown()
Dave Barach8b5dc4f2018-07-23 18:00:54 -040021
22 def test_bihash_unittest(self):
23 """ Bihash Add/Del Test """
24 error = self.vapi.cli("test bihash ")
25
26 if error:
27 self.logger.critical(error)
Paul Vinciguerra9a6dafd2019-03-06 15:11:28 -080028 self.assertNotIn('failed', error)
Dave Barach8b5dc4f2018-07-23 18:00:54 -040029
30 def test_bihash_thread(self):
31 """ Bihash Thread Test """
32
33 error = self.vapi.cli("test bihash threads 2 nbuckets 64000")
34
35 if error:
36 self.logger.critical(error)
Paul Vinciguerra9a6dafd2019-03-06 15:11:28 -080037 self.assertNotIn('failed', error)
Dave Barach8b5dc4f2018-07-23 18:00:54 -040038
39if __name__ == '__main__':
40 unittest.main(testRunner=VppTestRunner)