summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/http_test.go
diff options
context:
space:
mode:
authoradrianvillin <avillin@cisco.com>2024-02-12 02:44:53 -0500
committerFlorin Coras <florin.coras@gmail.com>2024-02-15 02:38:10 +0000
commit7c675471e87c72be272c078fd481844e4efa64d0 (patch)
tree0fe20b6de72178124750a7a8f92155bef4a7c815 /extras/hs-test/http_test.go
parent0215ef1010fbe41a72d57e7cddc4fb18dc3d53d2 (diff)
hs-test: improved logging
- improved readability of some error messages - printing container logs to stdout on test failure (last 20 lines) Type: test Change-Id: Idbb358bdd89aa7b1a6bdc9d96bf029d4c299ce64 Signed-off-by: adrianvillin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test/http_test.go')
-rw-r--r--extras/hs-test/http_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index 9872f8db560..e710f38835b 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -20,7 +20,7 @@ func (s *NsSuite) TestHttpTps() {
go s.startWget(finished, client_ip, port, "test_file_10M", "client")
// wait for client
err := <-finished
- s.assertNil(err)
+ s.assertNil(err, err)
}
func (s *VethsSuite) TestHttpCli() {
@@ -56,7 +56,7 @@ func (s *NoTopoSuite) TestNginxHttp3() {
args := fmt.Sprintf("curl --noproxy '*' --local-port 55444 --http3-only -k https://%s:8443/%s", serverAddress, query)
curlCont.extraRunningArgs = args
o, err := curlCont.combinedOutput()
- s.assertNil(err)
+ s.assertNil(err, err)
s.assertContains(o, "<http>", "<http> not found in the result!")
}
@@ -69,7 +69,7 @@ func (s *NoTopoSuite) TestHttpStaticProm() {
s.log(vpp.vppctl("prom enable"))
go s.startWget(finished, serverAddress, "80", query, "")
err := <-finished
- s.assertNil(err)
+ s.assertNil(err, err)
}
func (s *NoTopoSuite) TestNginxAsServer() {
@@ -126,7 +126,7 @@ func runNginxPerf(s *NoTopoSuite, mode, ab_or_wrk string) error {
o, err := abCont.combinedOutput()
rps := parseString(o, "Requests per second:")
s.log(rps, err)
- s.assertNil(err)
+ s.assertNil(err, "err: '%s', output: '%s'", err, o)
} else {
wrkCont := s.getContainerByName("wrk")
args := fmt.Sprintf("-c %d -t 2 -d 30 http://%s:80/64B.json", nClients,
@@ -135,7 +135,7 @@ func runNginxPerf(s *NoTopoSuite, mode, ab_or_wrk string) error {
o, err := wrkCont.combinedOutput()
rps := parseString(o, "requests")
s.log(rps, err)
- s.assertNil(err)
+ s.assertNil(err, "err: '%s', output: '%s'", err, o)
}
return nil
}