hs-test: add nginx test
Type: test
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Idd5352f254df0d1f36c1270e73440c9287247b81
diff --git a/extras/hs-test/utils.go b/extras/hs-test/utils.go
index 583dc4a..e23ea81 100755
--- a/extras/hs-test/utils.go
+++ b/extras/hs-test/utils.go
@@ -176,17 +176,16 @@
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