summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/http_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/http_test.go')
-rw-r--r--extras/hs-test/http_test.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index acd026d484f..fe12f5a2f65 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -13,7 +13,7 @@ func init() {
registerNsTests(HttpTpsTest)
registerVethTests(HttpCliTest)
registerNoTopoTests(NginxHttp3Test, NginxAsServerTest,
- NginxPerfCpsTest, NginxPerfRpsTest, NginxPerfWrkTest)
+ NginxPerfCpsTest, NginxPerfRpsTest, NginxPerfWrkTest, HeaderServerTest)
registerNoTopoSoloTests(HttpStaticPromTest)
}
@@ -91,6 +91,21 @@ func HttpStaticPromTest(s *NoTopoSuite) {
s.assertNil(err)
}
+func HeaderServerTest(s *NoTopoSuite) {
+ query := "show/version"
+ vpp := s.getContainerByName("vpp").vppInstance
+ serverAddress := s.getInterfaceByName(tapInterfaceName).peer.ip4AddressString()
+ vpp.vppctl("http cli server")
+
+ curlCont := s.getContainerByName("curl")
+ args := fmt.Sprintf("curl -i -s http://%s:80/%s", serverAddress, query)
+ curlCont.extraRunningArgs = args
+ o, err := curlCont.combinedOutput()
+ s.assertNil(err, fmt.Sprint(err))
+ s.log(o)
+ s.assertContains(o, "Server: http_cli_server")
+}
+
func NginxAsServerTest(s *NoTopoSuite) {
query := "return_ok"
finished := make(chan error, 1)