aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2022-01-27 16:25:43 +0100
committerOle Troan <ot@cisco.com>2022-05-02 16:26:24 +0200
commit2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f (patch)
tree65061fc95f2ad79580a367ec4e11bcbcf380dcc9 /test
parent6a2868734c2f96186b6bfb705969a5daa702ebb6 (diff)
vapi: support api clients within vpp process
Add vapi_connect_from_vpp() and vapi_disconnect_from_vpp() calls to allow API clients from within VPP process. Add a new memclnt_create version that gives the user a knob to enable or disable dead client scans (keepalive). Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Id0b7bb89308db3a3aed2d3fcbedf4e1282dcd03f Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_api_client.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test_api_client.py b/test/test_api_client.py
new file mode 100644
index 00000000000..ec44be7e370
--- /dev/null
+++ b/test/test_api_client.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner
+from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+
+
+class TestAPIClient(VppTestCase):
+ """ API Internal client Test Cases """
+
+ def test_client_unittest(self):
+ """ Internal API client """
+ error = self.vapi.cli("test api internal")
+ if error:
+ self.logger.critical(error)
+ self.assertNotIn('failed', error)
+
+if __name__ == '__main__':
+ unittest.main(testRunner=VppTestRunner)