summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-11 01:04:05 +0300
committerValery Piashchynski <[email protected]>2021-09-11 01:04:05 +0300
commit0c4dd160a3eec4d76b9b82799c55eea4c5f50629 (patch)
treeabc3eef044d6da54e1ba118637564e4d911e0fa6 /tests
parent6984e25ecdfc113400007c45fd69822f09b46ff0 (diff)
Update .vscode settings
Update codecov Update configs Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/broadcast/configs/.rr-broadcast-global.yaml2
-rw-r--r--tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml2
-rw-r--r--tests/plugins/kv/storage_plugin_test.go15
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-allow.yaml1
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-deny.yaml1
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-init.yaml1
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-stop.yaml1
7 files changed, 21 insertions, 2 deletions
diff --git a/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml b/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml
index d3cf2306..a7f9c35d 100644
--- a/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml
+++ b/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml
@@ -40,8 +40,10 @@ broadcast:
- "127.0.0.1:6378"
test3:
driver: memory
+ config: {}
test4:
driver: memory
+ config: {}
logs:
mode: development
diff --git a/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml b/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml
index b42834a9..85a767cb 100644
--- a/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml
+++ b/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml
@@ -39,8 +39,10 @@ broadcast:
- "127.0.0.1:6378"
test3:
driver: memory
+ config: {}
test4:
driver: memory
+ config: {}
logs:
mode: development
level: info
diff --git a/tests/plugins/kv/storage_plugin_test.go b/tests/plugins/kv/storage_plugin_test.go
index ec9e74fd..c10e4726 100644
--- a/tests/plugins/kv/storage_plugin_test.go
+++ b/tests/plugins/kv/storage_plugin_test.go
@@ -10,6 +10,7 @@ import (
"testing"
"time"
+ "github.com/golang/mock/gomock"
endure "github.com/spiral/endure/pkg/container"
goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2/plugins/boltdb"
@@ -21,6 +22,7 @@ import (
"github.com/spiral/roadrunner/v2/plugins/redis"
rpcPlugin "github.com/spiral/roadrunner/v2/plugins/rpc"
payload "github.com/spiral/roadrunner/v2/proto/kv/v1beta"
+ "github.com/spiral/roadrunner/v2/tests/mocks"
"github.com/stretchr/testify/assert"
)
@@ -1293,12 +1295,21 @@ func TestRedisNoConfig(t *testing.T) {
Prefix: "rr",
}
+ controller := gomock.NewController(t)
+ mockLogger := mocks.NewMockLogger(controller)
+
+ mockLogger.EXPECT().Debug("worker destructed", "pid", gomock.Any()).AnyTimes()
+ mockLogger.EXPECT().Debug("worker constructed", "pid", gomock.Any()).AnyTimes()
+ mockLogger.EXPECT().Debug("Started RPC service", "address", "tcp://127.0.0.1:6001", "plugins", []string{"kv"}).AnyTimes()
+
+ mockLogger.EXPECT().Error(`can't find local or global configuration, this section will be skipped`, "local: ", "kv.redis-rr.config", "global: ", "redis-rr").Times(1)
+
err = cont.RegisterAll(
cfg,
&kv.Plugin{},
&redis.Plugin{},
&rpcPlugin.Plugin{},
- &logger.ZapLogger{},
+ mockLogger,
&memory.Plugin{},
)
assert.NoError(t, err)
@@ -1309,7 +1320,7 @@ func TestRedisNoConfig(t *testing.T) {
}
_, err = cont.Serve()
- assert.Error(t, err)
+ assert.NoError(t, err)
}
func testRPCMethodsRedis(t *testing.T) {
diff --git a/tests/plugins/websockets/configs/.rr-websockets-allow.yaml b/tests/plugins/websockets/configs/.rr-websockets-allow.yaml
index 9c46ef6e..3d0268d4 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-allow.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-allow.yaml
@@ -35,6 +35,7 @@ redis:
broadcast:
test:
driver: memory
+ config: {}
websockets:
broker: test
diff --git a/tests/plugins/websockets/configs/.rr-websockets-deny.yaml b/tests/plugins/websockets/configs/.rr-websockets-deny.yaml
index c5bea82f..61265c4b 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-deny.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-deny.yaml
@@ -31,6 +31,7 @@ http:
broadcast:
test:
driver: memory
+ config: {}
websockets:
broker: test
diff --git a/tests/plugins/websockets/configs/.rr-websockets-init.yaml b/tests/plugins/websockets/configs/.rr-websockets-init.yaml
index 7de9dff8..3120f146 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-init.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-init.yaml
@@ -31,6 +31,7 @@ http:
broadcast:
default:
driver: memory
+ config: {}
websockets:
broker: default
diff --git a/tests/plugins/websockets/configs/.rr-websockets-stop.yaml b/tests/plugins/websockets/configs/.rr-websockets-stop.yaml
index ba4b21f1..35529e9e 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-stop.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-stop.yaml
@@ -31,6 +31,7 @@ http:
broadcast:
test:
driver: memory
+ config: {}
websockets:
broker: test