summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/utils.go
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2022-12-21 08:59:16 +0100
committerFilip Tehlar <ftehlar@cisco.com>2023-01-09 11:39:06 +0100
commitc204c87c186993704927beffa4d5b1cafaf9a193 (patch)
treeeeb2e5e7a8baad5252df7c8e02c488a2b88432bc /extras/hs-test/utils.go
parent227660b9969410f29d6b3d14eba16be5f57fbffe (diff)
hs-test: add nginx test
Type: test Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Idd5352f254df0d1f36c1270e73440c9287247b81
Diffstat (limited to 'extras/hs-test/utils.go')
-rwxr-xr-xextras/hs-test/utils.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/extras/hs-test/utils.go b/extras/hs-test/utils.go
index 583dc4aff54..e23ea814269 100755
--- a/extras/hs-test/utils.go
+++ b/extras/hs-test/utils.go
@@ -176,17 +176,16 @@ func startHttpServer(running chan struct{}, done chan struct{}, addressPort, net
cmd.Process.Kill()
}
-func startWget(finished chan error, server_ip, port string, netNs string) {
- fname := "test_file_10M"
+func startWget(finished chan error, server_ip, port, query, netNs string) {
defer func() {
finished <- errors.New("wget error")
}()
- cmd := NewCommand([]string{"wget", "--tries=5", "-q", "-O", "/dev/null", server_ip + ":" + port + "/" + fname},
+ cmd := NewCommand([]string{"wget", "--tries=5", "-q", "-O", "/dev/null", server_ip + ":" + port + "/" + query},
netNs)
o, err := cmd.CombinedOutput()
if err != nil {
- finished <- errors.New(fmt.Sprintf("wget error: '%s'.\n%s", err, o))
+ finished <- fmt.Errorf("wget error: '%v\n\n%s'", err, o)
return
}
finished <- nil