hs-test: http tps test with tls 25/42125/2
authorMatus Fabian <[email protected]>
Thu, 9 Jan 2025 19:00:28 +0000 (20:00 +0100)
committerFlorin Coras <[email protected]>
Thu, 9 Jan 2025 21:31:38 +0000 (21:31 +0000)
Type: test

Change-Id: I0b4044c2924855f4be03c301f75e6a3e31aa29a9
Signed-off-by: Matus Fabian <[email protected]>
extras/hs-test/http_test.go

index 99e812d..4b67d27 100644 (file)
@@ -39,7 +39,7 @@ func init() {
                HttpClientGetRepeat, HttpClientPostRepeat, HttpIgnoreH2UpgradeTest)
        RegisterNoTopoSoloTests(HttpStaticPromTest, HttpGetTpsTest, HttpGetTpsInterruptModeTest, PromConcurrentConnectionsTest,
                PromMemLeakTest, HttpClientPostMemLeakTest, HttpInvalidClientRequestMemLeakTest, HttpPostTpsTest, HttpPostTpsInterruptModeTest,
-               PromConsecutiveConnectionsTest)
+               PromConsecutiveConnectionsTest, HttpGetTpsTlsTest, HttpPostTpsTlsTest)
 }
 
 const wwwRootPath = "/tmp/www_root"
@@ -76,6 +76,16 @@ func HttpGetTpsTest(s *NoTopoSuite) {
        s.RunBenchmark("HTTP tps download 10M", 10, 0, httpDownloadBenchmark, url)
 }
 
+func HttpGetTpsTlsTest(s *NoTopoSuite) {
+       vpp := s.Containers.Vpp.VppInstance
+       serverAddress := s.VppAddr()
+       url := "https://" + serverAddress + ":8080/test_file_10M"
+
+       vpp.Vppctl("http tps uri tls://0.0.0.0/8080")
+
+       s.RunBenchmark("HTTP tps download 10M", 10, 0, httpDownloadBenchmark, url)
+}
+
 func httpUploadBenchmark(s *HstSuite, experiment *gmeasure.Experiment, data interface{}) {
        url, isValid := data.(string)
        s.AssertEqual(true, isValid)
@@ -109,6 +119,16 @@ func HttpPostTpsTest(s *NoTopoSuite) {
        s.RunBenchmark("HTTP tps upload 10M", 10, 0, httpUploadBenchmark, url)
 }
 
+func HttpPostTpsTlsTest(s *NoTopoSuite) {
+       vpp := s.Containers.Vpp.VppInstance
+       serverAddress := s.VppAddr()
+       url := "https://" + serverAddress + ":8080/test_file_10M"
+
+       vpp.Vppctl("http tps uri tls://0.0.0.0/8080")
+
+       s.RunBenchmark("HTTP tps upload 10M", 10, 0, httpUploadBenchmark, url)
+}
+
 func HttpPersistentConnectionTest(s *NoTopoSuite) {
        // testing url handler app do not support multi-thread
        s.SkipIfMultiWorker()