2021-11-09 14:15:45 +00:00
|
|
|
package rpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"testing"
|
|
|
|
|
2022-01-18 18:17:06 +00:00
|
|
|
"github.com/status-im/go-waku/tests"
|
2021-11-09 14:15:45 +00:00
|
|
|
"github.com/status-im/go-waku/waku/v2/node"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestWakuRpc(t *testing.T) {
|
|
|
|
options := node.WithWakuStore(false, false)
|
|
|
|
n, err := node.New(context.Background(), options)
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
2022-01-18 18:17:06 +00:00
|
|
|
rpc := NewWakuRpc(n, "127.0.0.1", 8080, tests.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")
|
|
|
|
}
|