diff options
author | Matus Fabian <matfabia@cisco.com> | 2024-05-13 10:29:11 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-05-14 22:38:23 +0000 |
commit | 3d00893c37a725da6ead642a8d8852e9f5c13628 (patch) | |
tree | d5388d969607035b20edaf27a0313640b9b1d5ac /extras/hs-test | |
parent | b7a9ed75fbce1e5e69441916a14235b3a1403593 (diff) |
http: notify client when connection failed
Type: fix
Change-Id: I87054e9667fe990d9a2dc3950bc3ce348460018a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'extras/hs-test')
-rw-r--r-- | extras/hs-test/http_test.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go index 63a5b8e5832..f52d2816930 100644 --- a/extras/hs-test/http_test.go +++ b/extras/hs-test/http_test.go @@ -12,7 +12,7 @@ import ( func init() { registerNsTests(HttpTpsTest) - registerVethTests(HttpCliTest) + registerVethTests(HttpCliTest, HttpCliConnectErrorTest) registerNoTopoTests(NginxHttp3Test, NginxAsServerTest, NginxPerfCpsTest, NginxPerfRpsTest, NginxPerfWrkTest, HeaderServerTest, HttpStaticMovedTest, HttpStaticNotFoundTest, HttpCliMethodNotAllowedTest, @@ -58,6 +58,20 @@ func HttpCliTest(s *VethsSuite) { s.assertContains(o, "<html>", "<html> not found in the result!") } +func HttpCliConnectErrorTest(s *VethsSuite) { + clientContainer := s.getContainerByName("client-vpp") + + serverVeth := s.getInterfaceByName(serverInterfaceName) + + uri := "http://" + serverVeth.ip4AddressString() + "/80" + + o := clientContainer.vppInstance.vppctl("http cli client" + + " uri " + uri + " query /show/vlib/graph") + + s.log(o) + s.assertContains(o, "failed to connect") +} + func NginxHttp3Test(s *NoTopoSuite) { s.SkipUnlessExtendedTestsBuilt() |