Skip to content

Commit

Permalink
lint issue fix
Browse files Browse the repository at this point in the history
Signed-off-by: Harish P <harish_p4@dell.com>
  • Loading branch information
harishp8889 committed Dec 15, 2022
1 parent ea0dd2b commit 2be0a96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/mock-server/stub/stub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ func TestStub(t *testing.T) {
for _, v := range cases {
t.Run(v.name, func(t *testing.T) {
wrt := httptest.NewRecorder()
req := v.mock()
v.handler(wrt, req)
_, err := io.ReadAll(wrt.Result().Body)
defer func() {
err := wrt.Result().Body.Close()
err := wrt.Result().Body
if err != nil {
log.Fatal(err)
}
}()
req := v.mock()
v.handler(wrt, req)
_, err := io.ReadAll(wrt.Result().Body)
assert.NoError(t, err)
})
}
Expand Down

0 comments on commit 2be0a96

Please # to comment.