@@ -23,7 +23,7 @@ func nodeWithMemoryEngine() *centrifuge.Node {
23
23
24
24
func TestPublishAPI (t * testing.T ) {
25
25
node := nodeWithMemoryEngine ()
26
- api := newAPIExecutor (node )
26
+ api := newAPIExecutor (node , "test" )
27
27
resp := api .Publish (context .Background (), & PublishRequest {})
28
28
assert .Equal (t , ErrorBadRequest , resp .Error )
29
29
@@ -39,7 +39,7 @@ func TestPublishAPI(t *testing.T) {
39
39
40
40
func TestBroadcastAPI (t * testing.T ) {
41
41
node := nodeWithMemoryEngine ()
42
- api := newAPIExecutor (node )
42
+ api := newAPIExecutor (node , "test" )
43
43
resp := api .Broadcast (context .Background (), & BroadcastRequest {})
44
44
assert .Equal (t , ErrorBadRequest , resp .Error )
45
45
@@ -58,7 +58,7 @@ func TestBroadcastAPI(t *testing.T) {
58
58
59
59
func TestHistoryAPI (t * testing.T ) {
60
60
node := nodeWithMemoryEngine ()
61
- api := newAPIExecutor (node )
61
+ api := newAPIExecutor (node , "test" )
62
62
resp := api .History (context .Background (), & HistoryRequest {})
63
63
assert .Equal (t , ErrorBadRequest , resp .Error )
64
64
resp = api .History (context .Background (), & HistoryRequest {Channel : "test" })
@@ -75,7 +75,7 @@ func TestHistoryAPI(t *testing.T) {
75
75
76
76
func TestHistoryRemoveAPI (t * testing.T ) {
77
77
node := nodeWithMemoryEngine ()
78
- api := newAPIExecutor (node )
78
+ api := newAPIExecutor (node , "test" )
79
79
resp := api .HistoryRemove (context .Background (), & HistoryRemoveRequest {})
80
80
assert .Equal (t , ErrorBadRequest , resp .Error )
81
81
resp = api .HistoryRemove (context .Background (), & HistoryRemoveRequest {Channel : "test" })
@@ -92,7 +92,7 @@ func TestHistoryRemoveAPI(t *testing.T) {
92
92
93
93
func TestPresenceAPI (t * testing.T ) {
94
94
node := nodeWithMemoryEngine ()
95
- api := newAPIExecutor (node )
95
+ api := newAPIExecutor (node , "test" )
96
96
resp := api .Presence (context .Background (), & PresenceRequest {})
97
97
assert .Equal (t , ErrorBadRequest , resp .Error )
98
98
resp = api .Presence (context .Background (), & PresenceRequest {Channel : "test" })
@@ -109,7 +109,7 @@ func TestPresenceAPI(t *testing.T) {
109
109
110
110
func TestPresenceStatsAPI (t * testing.T ) {
111
111
node := nodeWithMemoryEngine ()
112
- api := newAPIExecutor (node )
112
+ api := newAPIExecutor (node , "test" )
113
113
resp := api .PresenceStats (context .Background (), & PresenceStatsRequest {})
114
114
assert .Equal (t , ErrorBadRequest , resp .Error )
115
115
resp = api .PresenceStats (context .Background (), & PresenceStatsRequest {Channel : "test" })
@@ -125,7 +125,7 @@ func TestPresenceStatsAPI(t *testing.T) {
125
125
126
126
func TestDisconnectAPI (t * testing.T ) {
127
127
node := nodeWithMemoryEngine ()
128
- api := newAPIExecutor (node )
128
+ api := newAPIExecutor (node , "test" )
129
129
resp := api .Disconnect (context .Background (), & DisconnectRequest {})
130
130
assert .Equal (t , ErrorBadRequest , resp .Error )
131
131
resp = api .Disconnect (context .Background (), & DisconnectRequest {
@@ -136,7 +136,7 @@ func TestDisconnectAPI(t *testing.T) {
136
136
137
137
func TestUnsubscribeAPI (t * testing.T ) {
138
138
node := nodeWithMemoryEngine ()
139
- api := newAPIExecutor (node )
139
+ api := newAPIExecutor (node , "test" )
140
140
resp := api .Unsubscribe (context .Background (), & UnsubscribeRequest {})
141
141
assert .Equal (t , ErrorBadRequest , resp .Error )
142
142
resp = api .Unsubscribe (context .Background (), & UnsubscribeRequest {
@@ -148,14 +148,14 @@ func TestUnsubscribeAPI(t *testing.T) {
148
148
149
149
func TestChannelsAPI (t * testing.T ) {
150
150
node := nodeWithMemoryEngine ()
151
- api := newAPIExecutor (node )
151
+ api := newAPIExecutor (node , "test" )
152
152
resp := api .Channels (context .Background (), & ChannelsRequest {})
153
153
assert .Nil (t , resp .Error )
154
154
}
155
155
156
156
func TestInfoAPI (t * testing.T ) {
157
157
node := nodeWithMemoryEngine ()
158
- api := newAPIExecutor (node )
158
+ api := newAPIExecutor (node , "test" )
159
159
resp := api .Info (context .Background (), & InfoRequest {})
160
160
assert .Nil (t , resp .Error )
161
161
}
0 commit comments