summaryrefslogtreecommitdiff
path: root/tests/plugins/http
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-18 21:34:55 +0300
committerGitHub <[email protected]>2021-01-18 21:34:55 +0300
commita9a206b31e272e0508fff496e9641c4db291ddb7 (patch)
tree7b63544ead9f87af8493ebfb95a742acc263278e /tests/plugins/http
parent77be5a1d2db3ca6ce1408f254391c66e0c5367e8 (diff)
parenteaa3aed1188873c734dd6e283111f811745cca61 (diff)
Merge pull request #483 from spiral/bug/incorrect_env_variables
bug(server): Incorrectly set environment variables
Diffstat (limited to 'tests/plugins/http')
-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{}