2022-07-24 20:51:42 +00:00
|
|
|
package rest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"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"
|
2022-07-24 20:51:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestWakuRest(t *testing.T) {
|
2023-01-03 15:17:25 +00:00
|
|
|
options := node.WithWakuStore()
|
2023-01-06 22:37:57 +00:00
|
|
|
n, err := node.New(options)
|
2022-07-24 20:51:42 +00:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2022-12-11 00:08:25 +00:00
|
|
|
rpc := NewWakuRest(n, "127.0.0.1", 8080, true, true, false, 10, utils.Logger())
|
2022-07-24 20:51:42 +00:00
|
|
|
require.NotNil(t, rpc.server)
|
|
|
|
require.Equal(t, rpc.server.Addr, "127.0.0.1:8080")
|
|
|
|
}
|