summaryrefslogtreecommitdiff
path: root/tests/plugins/websockets/websocket_plugin_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-05-31 16:05:00 +0300
committerValery Piashchynski <[email protected]>2021-05-31 16:05:00 +0300
commit49703d70a3ede70ce9a0cab824cbcb96dbf824c0 (patch)
tree181d72a3321d52c960a519ba3a233e3e7fe8e86a /tests/plugins/websockets/websocket_plugin_test.go
parent0ee91dc24d3e68706d89092c06b1c0d09dab0353 (diff)
- Rework access_validators
- WS plugin uses it's own pool to handle requests on the /ws (or any user-defined) endpoint - Ability to write custom validators Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/plugins/websockets/websocket_plugin_test.go')
-rw-r--r--tests/plugins/websockets/websocket_plugin_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/plugins/websockets/websocket_plugin_test.go b/tests/plugins/websockets/websocket_plugin_test.go
index 61ef186b..6b11f9e1 100644
--- a/tests/plugins/websockets/websocket_plugin_test.go
+++ b/tests/plugins/websockets/websocket_plugin_test.go
@@ -16,7 +16,6 @@ import (
json "github.com/json-iterator/go"
endure "github.com/spiral/endure/pkg/container"
goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
- "github.com/spiral/roadrunner/v2/plugins/channel"
"github.com/spiral/roadrunner/v2/plugins/config"
httpPlugin "github.com/spiral/roadrunner/v2/plugins/http"
"github.com/spiral/roadrunner/v2/plugins/logger"
@@ -60,7 +59,6 @@ func TestBroadcastInit(t *testing.T) {
&redis.Plugin{},
&websockets.Plugin{},
&httpPlugin.Plugin{},
- &channel.Plugin{},
)
assert.NoError(t, err)
@@ -170,7 +168,6 @@ func TestWSRedisAndMemory(t *testing.T) {
&websockets.Plugin{},
&httpPlugin.Plugin{},
&memory.Plugin{},
- &channel.Plugin{},
)
assert.NoError(t, err)
@@ -313,7 +310,9 @@ func RPCWsMemory(t *testing.T) {
assert.NoError(t, err)
defer func() {
- _ = resp.Body.Close()
+ if resp != nil && resp.Body != nil {
+ _ = resp.Body.Close()
+ }
}()
d, err := json.Marshal(message("join", "memory", []byte("hello websockets"), "foo", "foo2"))