From 594d801d14bb394b20eec14690d1b616e2c4d56d Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sat, 13 Mar 2021 21:06:20 +0300 Subject: - Add ability to print http/https/fcgi to the rr logger under the Info level - Update tests and CHANGELOG Signed-off-by: Valery Piashchynski --- tests/plugins/http/configs/.rr-h2c.yaml | 5 +++-- tests/plugins/http/http_plugin_test.go | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'tests') 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..752bd84e 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().Info("server internal stderr", "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{}, ) -- cgit v1.2.3