go-waku/waku/v2/rpc/store_test.go
Richard Ramos 11d1f8fb0d
feat: result aggregation in resume and enforce max page size (#183)
* feat: result aggregation in resume and enforce max page size
* feat: add WithLogger option to wakunode (#184)
* fix: rebase issues
2022-01-18 14:17:06 -04:00

34 lines
672 B
Go

package rpc
import (
"context"
"testing"
"github.com/status-im/go-waku/tests"
"github.com/status-im/go-waku/waku/v2/node"
"github.com/stretchr/testify/require"
)
func makeStoreService(t *testing.T) *StoreService {
options := node.WithWakuStore(false, false)
n, err := node.New(context.Background(), options)
require.NoError(t, err)
err = n.Start()
require.NoError(t, err)
return &StoreService{n, tests.Logger()}
}
func TestStoreGetV1Messages(t *testing.T) {
var reply StoreMessagesReply
s := makeStoreService(t)
err := s.GetV1Messages(
makeRequest(t),
&StoreMessagesArgs{},
&reply,
)
require.NoError(t, err)
require.NotEmpty(t, reply.Error)
}