This repository was archived by the owner on Jul 1, 2021. It is now read-only.
File tree 9 files changed +24
-15
lines changed
9 files changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ package ws
2
2
3
3
import (
4
4
"bytes"
5
- "github.com/spiral/roadrunner/service/http/attributes"
6
5
"io"
7
6
"net/http"
8
7
"strings"
8
+
9
+ "github.com/spiral/roadrunner/service/http/attributes"
9
10
)
10
11
11
12
type accessValidator struct {
Original file line number Diff line number Diff line change 1
1
package ws
2
2
3
3
import (
4
- "github.com/stretchr/testify/assert"
5
4
"testing"
5
+
6
+ "github.com/stretchr/testify/assert"
6
7
)
7
8
8
9
func TestResponseWrapper_Body (t * testing.T ) {
Original file line number Diff line number Diff line change 1
1
package ws
2
2
3
3
import (
4
+ "strings"
5
+
4
6
"github.com/gorilla/websocket"
5
7
"github.com/sirupsen/logrus"
6
8
"github.com/spf13/cobra"
7
9
ws "github.com/spiral/broadcast-ws"
8
10
rr "github.com/spiral/roadrunner/cmd/rr/cmd"
9
11
"github.com/spiral/roadrunner/cmd/util"
10
- "strings"
11
12
)
12
13
13
14
func init () {
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package ws
2
2
3
3
import (
4
4
"encoding/json"
5
+ "testing"
6
+
5
7
"github.com/spiral/roadrunner/service"
6
8
"github.com/stretchr/testify/assert"
7
- "testing"
8
9
)
9
10
10
11
type mockCfg struct { cfg string }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package ws
2
2
3
3
import (
4
4
"encoding/json"
5
+
5
6
"github.com/gorilla/websocket"
6
7
"github.com/spiral/broadcast"
7
8
)
Original file line number Diff line number Diff line change 1
1
package ws
2
2
3
3
import (
4
- "github.com/stretchr/testify/assert"
5
4
"testing"
5
+
6
+ "github.com/stretchr/testify/assert"
6
7
)
7
8
8
9
func TestConnContext_ManageTopics (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package ws
2
2
3
3
import (
4
4
"errors"
5
+ "sync"
6
+
5
7
"github.com/gorilla/websocket"
6
8
"github.com/spiral/broadcast"
7
- "sync"
8
9
)
9
10
10
11
// manages a set of websocket connections
Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ package ws
2
2
3
3
import (
4
4
"encoding/json"
5
+ "net/http"
6
+ "sync"
7
+ "sync/atomic"
8
+
5
9
"github.com/gorilla/websocket"
6
10
"github.com/spiral/broadcast"
7
11
"github.com/spiral/roadrunner/service/env"
8
12
rhttp "github.com/spiral/roadrunner/service/http"
9
13
"github.com/spiral/roadrunner/service/rpc"
10
- "net/http"
11
- "sync"
12
- "sync/atomic"
13
14
)
14
15
15
16
// ID defines service id.
Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ package ws
2
2
3
3
import (
4
4
"encoding/json"
5
+ "io/ioutil"
6
+ "net/http"
7
+ "net/url"
8
+ "strings"
9
+ "testing"
10
+ "time"
11
+
5
12
"github.com/gorilla/websocket"
6
13
"github.com/sirupsen/logrus"
7
14
"github.com/sirupsen/logrus/hooks/test"
@@ -11,12 +18,6 @@ import (
11
18
rrhttp "github.com/spiral/roadrunner/service/http"
12
19
"github.com/spiral/roadrunner/service/rpc"
13
20
"github.com/stretchr/testify/assert"
14
- "io/ioutil"
15
- "net/http"
16
- "net/url"
17
- "strings"
18
- "testing"
19
- "time"
20
21
)
21
22
22
23
type testCfg struct {
You can’t perform that action at this time.
0 commit comments