aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_session.py31
-rw-r--r--test/test_tcp.py31
-rw-r--r--test/vpp_papi_provider.py5
3 files changed, 67 insertions, 0 deletions
diff --git a/test/test_session.py b/test/test_session.py
new file mode 100644
index 00000000000..7219ffdc545
--- /dev/null
+++ b/test/test_session.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner
+
+
+class TestSession(VppTestCase):
+ """ Session Test Case """
+
+ @classmethod
+ def setUpClass(cls):
+ super(TestSession, cls).setUpClass()
+
+ def setUp(self):
+ super(TestSession, self).setUp()
+
+ def tearDown(self):
+ super(TestSession, self).tearDown()
+ self.vapi.session_enable_disable(is_enabled=1)
+
+ def test_session(self):
+ """ Session Unit Tests """
+ error = self.vapi.cli("test session all")
+
+ if error:
+ self.logger.critical(error)
+ self.assertEqual(error.find("Failed"), -1)
+
+if __name__ == '__main__':
+ unittest.main(testRunner=VppTestRunner)
diff --git a/test/test_tcp.py b/test/test_tcp.py
new file mode 100644
index 00000000000..869ef1af9a6
--- /dev/null
+++ b/test/test_tcp.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner
+
+
+class TestTCP(VppTestCase):
+ """ TCP Test Case """
+
+ @classmethod
+ def setUpClass(cls):
+ super(TestTCP, cls).setUpClass()
+
+ def setUp(self):
+ super(TestTCP, self).setUp()
+ self.vapi.session_enable_disable(is_enabled=1)
+
+ def tearDown(self):
+ super(TestTCP, self).tearDown()
+
+ def test_tcp(self):
+ """ TCP Unit Tests """
+ error = self.vapi.cli("test tcp all")
+
+ if error:
+ self.logger.critical(error)
+ self.assertEqual(error.find("Failed"), -1)
+
+if __name__ == '__main__':
+ unittest.main(testRunner=VppTestRunner)
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index c4b1601eb42..c8954f842b4 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -2806,3 +2806,8 @@ class VppPapiProvider(object):
return self.api(self.papi.add_node_next,
{'node_name': node_name,
'next_name': next_name})
+
+ def session_enable_disable(self, is_enabled):
+ return self.api(
+ self.papi.session_enable_disable,
+ {'is_enable': is_enabled})