From 036328f1eaaa0f12afae74477ead890de926fb58 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Tue, 3 Jan 2023 18:02:35 +0800 Subject: [PATCH] chore: update tests (#2741) * chore: update tests * chore: codecov on comments * chore: codecov on comments --- .codecov.yml | 5 ++++- core/logx/logs_test.go | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 5edbb9be..f93e9963 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,3 +1,6 @@ -comment: false +comment: + layout: "flags, files" + behavior: once + require_changes: true ignore: - "tools" \ No newline at end of file diff --git a/core/logx/logs_test.go b/core/logx/logs_test.go index e8068a78..e3938866 100644 --- a/core/logx/logs_test.go +++ b/core/logx/logs_test.go @@ -529,9 +529,9 @@ func TestSetLevel(t *testing.T) { func TestSetLevelTwiceWithMode(t *testing.T) { testModes := []string{ - "mode", "console", "volumn", + "mode", } w := new(mockWriter) old := writer.Swap(w) @@ -790,11 +790,18 @@ func doTestStructedLogConsole(t *testing.T, w *mockWriter, write func(...interfa func testSetLevelTwiceWithMode(t *testing.T, mode string, w *mockWriter) { writer.Store(nil) + SetUp(LogConf{ + Mode: mode, + Level: "debug", + Path: "/dev/null", + Encoding: plainEncoding, + Stat: false, + TimeFormat: time.RFC3339, + }) SetUp(LogConf{ Mode: mode, - Level: "error", + Level: "info", Path: "/dev/null", - Stat: false, }) const message = "hello there" Info(message)