aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helper/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/helper/http.go')
-rw-r--r--tests/helper/http.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/helper/http.go b/tests/helper/http.go
index b379695d0..3c570d106 100644
--- a/tests/helper/http.go
+++ b/tests/helper/http.go
@@ -4,12 +4,15 @@ import (
"encoding/json"
"io/ioutil"
"net/http"
+ "testing"
)
-func CreateTests(uri string, value interface{}) error {
+func CreateTests(t *testing.T, uri string, value interface{}) {
resp, err := http.Get(uri)
if err != nil {
- panic(err)
+ t.Error(err)
+
+ return
}
defer resp.Body.Close()
@@ -17,8 +20,6 @@ func CreateTests(uri string, value interface{}) error {
err = json.Unmarshal(data, &value)
if err != nil {
- return err
+ t.Error(err)
}
-
- return nil
}