vcl: add dtls test 44/32244/4
authorFlorin Coras <fcoras@cisco.com>
Thu, 6 May 2021 19:46:04 +0000 (12:46 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 6 May 2021 21:55:41 +0000 (21:55 +0000)
Type: test

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I726ab3a22399e970b0dd37a5b174062137265914

test/test_vcl.py

index 64ca002..8bff4be 100644 (file)
@@ -450,6 +450,46 @@ class VCLThruHostStackTLS(VCLTestCase):
         self.logger.debug(self.vapi.cli("show app mq"))
 
 
+class VCLThruHostStackDTLS(VCLTestCase):
+    """ VCL Thru Host Stack DTLS """
+
+    @classmethod
+    def setUpClass(cls):
+        super(VCLThruHostStackDTLS, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(VCLThruHostStackDTLS, cls).tearDownClass()
+
+    def setUp(self):
+        super(VCLThruHostStackDTLS, self).setUp()
+
+        self.thru_host_stack_setup()
+        self.client_uni_dir_dtls_timeout = 20
+        self.server_dtls_args = ["-p dtls", self.server_port]
+        self.client_uni_dir_dtls_test_args = ["-N", "1000", "-U", "-X",
+                                              "-p dtls", "-T 1400",
+                                              self.loop0.local_ip4,
+                                              self.server_port]
+
+    def test_vcl_thru_host_stack_dtls_uni_dir(self):
+        """ run VCL thru host stack uni-directional DTLS test """
+
+        self.timeout = self.client_uni_dir_dtls_timeout
+        self.thru_host_stack_test("vcl_test_server", self.server_dtls_args,
+                                  "vcl_test_client",
+                                  self.client_uni_dir_dtls_test_args)
+
+    def tearDown(self):
+        self.thru_host_stack_tear_down()
+        super(VCLThruHostStackDTLS, self).tearDown()
+
+    def show_commands_at_teardown(self):
+        self.logger.debug(self.vapi.cli("show app server"))
+        self.logger.debug(self.vapi.cli("show session verbose 2"))
+        self.logger.debug(self.vapi.cli("show app mq"))
+
+
 class VCLThruHostStackBidirNsock(VCLTestCase):
     """ VCL Thru Host Stack Bidir Nsock """