mirror of https://github.com/status-im/go-waku.git
fix: test and lint
This commit is contained in:
parent
2bfdcb6fd1
commit
1c2c68fbfd
|
@ -46,7 +46,7 @@ func TestV1Peers(t *testing.T) {
|
||||||
|
|
||||||
err = a.GetV1Peers(request, &GetPeersArgs{}, &reply)
|
err = a.GetV1Peers(request, &GetPeersArgs{}, &reply)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Len(t, reply.Peers, 0)
|
require.Len(t, reply, 0)
|
||||||
|
|
||||||
var reply2 SuccessReply
|
var reply2 SuccessReply
|
||||||
|
|
||||||
|
@ -66,5 +66,5 @@ func TestV1Peers(t *testing.T) {
|
||||||
|
|
||||||
err = a.GetV1Peers(request, &GetPeersArgs{}, &reply)
|
err = a.GetV1Peers(request, &GetPeersArgs{}, &reply)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Len(t, reply.Peers, 2)
|
require.Len(t, reply, 2)
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ func (c *CodecRequest) writeServerResponse(w http.ResponseWriter, status int, re
|
||||||
if err == nil {
|
if err == nil {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
w.WriteHeader(status)
|
w.WriteHeader(status)
|
||||||
w.Write(b)
|
_, _ = w.Write(b)
|
||||||
} else {
|
} else {
|
||||||
// Not sure in which case will this happen. But seems harmless.
|
// Not sure in which case will this happen. But seems harmless.
|
||||||
rpc.WriteError(w, 400, err.Error())
|
rpc.WriteError(w, 400, err.Error())
|
||||||
|
|
Loading…
Reference in New Issue