rpc/client: add minimalistic websocket client

This commit is contained in:
Roman Khimov 2020-04-29 22:51:43 +03:00
parent 6333060897
commit 556ab39a5a
5 changed files with 230 additions and 11 deletions

View file

@ -0,0 +1,16 @@
package client
import (
"context"
"testing"
"github.com/stretchr/testify/require"
)
func TestWSClientClose(t *testing.T) {
srv := initTestServer(t, "")
defer srv.Close()
wsc, err := NewWS(context.TODO(), httpURLtoWS(srv.URL), Options{})
require.NoError(t, err)
wsc.Close()
}