summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/http/response_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/plugins/http/response_test.go b/tests/plugins/http/response_test.go
index 9bd2626d..dc9856ac 100644
--- a/tests/plugins/http/response_test.go
+++ b/tests/plugins/http/response_test.go
@@ -75,9 +75,10 @@ func TestNewResponse_Stream(t *testing.T) {
// r is pointer, so, it might be nil
if r == nil {
t.Fatal("response is nil")
+ return
}
- r.Body = &bytes.Buffer{}
+ r.Body = new(bytes.Buffer)
r.Body.(*bytes.Buffer).WriteString("hello world")
assert.NoError(t, err)
@@ -99,6 +100,7 @@ func TestNewResponse_StreamError(t *testing.T) {
// r is pointer, so, it might be nil
if r == nil {
t.Fatal("response is nil")
+ return
}
r.Body = &bytes.Buffer{}