aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test')
-rw-r--r--extras/hs-test/http_test.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index 91d0823d9c3..ad43f9d032e 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -22,7 +22,7 @@ import (
)
func init() {
- RegisterVethTests(HttpCliTest, HttpCliConnectErrorTest)
+ RegisterVethTests(HttpCliTest, HttpCliConnectErrorTest, HttpCliTlsTest)
RegisterSoloVethTests(HttpClientGetMemLeakTest)
RegisterNoTopoTests(HeaderServerTest, HttpPersistentConnectionTest, HttpPipeliningTest,
HttpStaticMovedTest, HttpStaticNotFoundTest, HttpCliMethodNotAllowedTest, HttpAbsoluteFormUriTest,
@@ -241,6 +241,25 @@ func HttpCliTest(s *VethsSuite) {
s.AssertContains(o, "</html>", "</html> not found in the result!")
}
+func HttpCliTlsTest(s *VethsSuite) {
+ uri := "tls://" + s.Interfaces.Server.Ip4AddressString() + "/443"
+
+ s.Containers.ServerVpp.VppInstance.Vppctl("http cli server uri " + uri)
+
+ o := s.Containers.ClientVpp.VppInstance.Vppctl("http cli client" +
+ " uri " + uri + " query /show/version")
+ s.Log(o)
+ s.AssertContains(o, "<html>", "<html> not found in the result!")
+ s.AssertContains(o, "</html>", "</html> not found in the result!")
+
+ /* second request to test postponed ho-cleanup */
+ o = s.Containers.ClientVpp.VppInstance.Vppctl("http cli client" +
+ " uri " + uri + " query /show/version")
+ s.Log(o)
+ s.AssertContains(o, "<html>", "<html> not found in the result!")
+ s.AssertContains(o, "</html>", "</html> not found in the result!")
+}
+
func HttpCliConnectErrorTest(s *VethsSuite) {
uri := "http://" + s.Interfaces.Server.Ip4AddressString() + "/80"