2021-11-09 14:15:45 +00:00
|
|
|
package rpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
2022-11-09 19:53:01 +00:00
|
|
|
"github.com/waku-org/go-waku/waku/v2/node"
|
|
|
|
"github.com/waku-org/go-waku/waku/v2/utils"
|
2021-11-09 14:15:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestWakuRpc(t *testing.T) {
|
2022-11-25 20:54:11 +00:00
|
|
|
options := node.WithWakuStore(false, nil)
|
2021-11-09 14:15:45 +00:00
|
|
|
n, err := node.New(context.Background(), options)
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
2022-10-20 13:18:23 +00:00
|
|
|
rpc := NewWakuRpc(n, "127.0.0.1", 8080, true, true, 30, utils.Logger())
|
2021-11-09 14:15:45 +00:00
|
|
|
require.NotNil(t, rpc.server)
|
|
|
|
require.Equal(t, rpc.server.Addr, "127.0.0.1:8080")
|
|
|
|
}
|