hs-test: add http prom test 21/40021/2
authorFilip Tehlar <ftehlar@cisco.com>
Wed, 29 Nov 2023 11:59:05 +0000 (12:59 +0100)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 30 Nov 2023 03:33:02 +0000 (03:33 +0000)
Type: test

Change-Id: Ia15ecc3cf2c087a6959601ff02e187c32570ff60
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
extras/hs-test/docker/Dockerfile.vpp
extras/hs-test/http_test.go
extras/hs-test/vppinstance.go

index d9b3f27..7c6d7f9 100644 (file)
@@ -15,6 +15,8 @@ COPY \
    $DIR/http_plugin.so \
    $DIR/unittest_plugin.so \
    $DIR/quic_plugin.so \
+   $DIR/http_static_plugin.so \
+   $DIR/prom_plugin.so \
    /usr/lib/x86_64-linux-gnu/vpp_plugins/
 
 COPY vpp-data/bin/* /usr/bin/
index 4aab553..53e6ec2 100644 (file)
@@ -60,6 +60,18 @@ func (s *NoTopoSuite) TestNginxHttp3() {
        s.assertContains(o, "<http>", "<http> not found in the result!")
 }
 
+func (s *NoTopoSuite) TestHttpStaticProm() {
+       finished := make(chan error, 1)
+       query := "stats.prom"
+       vpp := s.getContainerByName("vpp").vppInstance
+       serverAddress := s.netInterfaces[tapInterfaceName].peer.ip4AddressString()
+       s.log(vpp.vppctl("http static server uri tcp://" + serverAddress + "/80 url-handlers"))
+       s.log(vpp.vppctl("prom enable"))
+       go s.startWget(finished, serverAddress, "80", query, "")
+       err := <-finished
+       s.assertNil(err)
+}
+
 func (s *NoTopoSuite) TestNginxAsServer() {
        query := "return_ok"
        finished := make(chan error, 1)
index c20c5e2..e31b792 100644 (file)
@@ -56,6 +56,8 @@ plugins {
   plugin af_packet_plugin.so { enable }
   plugin hs_apps_plugin.so { enable }
   plugin http_plugin.so { enable }
+  plugin http_static_plugin.so { enable }
+  plugin prom_plugin.so { enable }
 }
 
 logging {