tcp/session: add make tests
[vpp.git] / test / test_tcp.py
1 #!/usr/bin/env python
2
3 import unittest
4
5 from framework import VppTestCase, VppTestRunner
6
7
8 class TestTCP(VppTestCase):
9     """ TCP Test Case """
10
11     @classmethod
12     def setUpClass(cls):
13         super(TestTCP, cls).setUpClass()
14
15     def setUp(self):
16         super(TestTCP, self).setUp()
17         self.vapi.session_enable_disable(is_enabled=1)
18
19     def tearDown(self):
20         super(TestTCP, self).tearDown()
21
22     def test_tcp(self):
23         """ TCP Unit Tests """
24         error = self.vapi.cli("test tcp all")
25
26         if error:
27             self.logger.critical(error)
28         self.assertEqual(error.find("Failed"), -1)
29
30 if __name__ == '__main__':
31     unittest.main(testRunner=VppTestRunner)