diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/plugins/http/configs/.rr-h2c.yaml | 5 | ||||
-rw-r--r-- | tests/plugins/http/http_plugin_test.go | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/plugins/http/configs/.rr-h2c.yaml b/tests/plugins/http/configs/.rr-h2c.yaml index 2061a76b..bd610bb0 100644 --- a/tests/plugins/http/configs/.rr-h2c.yaml +++ b/tests/plugins/http/configs/.rr-h2c.yaml @@ -24,5 +24,6 @@ http: h2c: true maxConcurrentStreams: 128 logs: - mode: development - level: error
\ No newline at end of file + mode: production + level: info + encoding: console
\ No newline at end of file diff --git a/tests/plugins/http/http_plugin_test.go b/tests/plugins/http/http_plugin_test.go index d55491ea..d136b437 100644 --- a/tests/plugins/http/http_plugin_test.go +++ b/tests/plugins/http/http_plugin_test.go @@ -705,11 +705,18 @@ func TestH2CUpgrade(t *testing.T) { Path: "configs/.rr-h2c.yaml", Prefix: "rr", } + controller := gomock.NewController(t) + mockLogger := mocks.NewMockLogger(controller) + + mockLogger.EXPECT().Error("server internal error", "message", gomock.Any()).MinTimes(1) + mockLogger.EXPECT().Debug("worker destructed", "pid", gomock.Any()).MinTimes(1) + mockLogger.EXPECT().Debug("worker constructed", "pid", gomock.Any()).MinTimes(1) + mockLogger.EXPECT().Debug("worker event received", "event", events.EventWorkerLog, "worker state", gomock.Any()).MinTimes(1) err = cont.RegisterAll( cfg, &rpcPlugin.Plugin{}, - &logger.ZapLogger{}, + mockLogger, &server.Plugin{}, &httpPlugin.Plugin{}, ) |