summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2025-01-09 20:00:28 +0100
committerFlorin Coras <florin.coras@gmail.com>2025-01-09 21:31:38 +0000
commit94223816a2fac1bf9dc35e0e18358150188206f7 (patch)
tree45cb7fb7510825a84b016941c0d6891c15461aa3
parentec68cec6c84e5dc9acaf7828c0118bb71fffc561 (diff)
hs-test: http tps test with tls
Type: test Change-Id: I0b4044c2924855f4be03c301f75e6a3e31aa29a9 Signed-off-by: Matus Fabian <matfabia@cisco.com>
-rw-r--r--extras/hs-test/http_test.go22
1 files changed, 21 insertions, 1 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index 99e812ded14..4b67d274882 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -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()