diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2022-12-21 08:59:16 +0100 |
---|---|---|
committer | Filip Tehlar <ftehlar@cisco.com> | 2023-01-09 11:39:06 +0100 |
commit | c204c87c186993704927beffa4d5b1cafaf9a193 (patch) | |
tree | eeb2e5e7a8baad5252df7c8e02c488a2b88432bc /extras/hs-test/utils.go | |
parent | 227660b9969410f29d6b3d14eba16be5f57fbffe (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-x | extras/hs-test/utils.go | 7 |
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 |