chore: update tests (#2741)
* chore: update tests * chore: codecov on comments * chore: codecov on comments
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
comment: false
|
comment:
|
||||||
|
layout: "flags, files"
|
||||||
|
behavior: once
|
||||||
|
require_changes: true
|
||||||
ignore:
|
ignore:
|
||||||
- "tools"
|
- "tools"
|
||||||
@@ -529,9 +529,9 @@ func TestSetLevel(t *testing.T) {
|
|||||||
|
|
||||||
func TestSetLevelTwiceWithMode(t *testing.T) {
|
func TestSetLevelTwiceWithMode(t *testing.T) {
|
||||||
testModes := []string{
|
testModes := []string{
|
||||||
"mode",
|
|
||||||
"console",
|
"console",
|
||||||
"volumn",
|
"volumn",
|
||||||
|
"mode",
|
||||||
}
|
}
|
||||||
w := new(mockWriter)
|
w := new(mockWriter)
|
||||||
old := writer.Swap(w)
|
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) {
|
func testSetLevelTwiceWithMode(t *testing.T, mode string, w *mockWriter) {
|
||||||
writer.Store(nil)
|
writer.Store(nil)
|
||||||
|
SetUp(LogConf{
|
||||||
|
Mode: mode,
|
||||||
|
Level: "debug",
|
||||||
|
Path: "/dev/null",
|
||||||
|
Encoding: plainEncoding,
|
||||||
|
Stat: false,
|
||||||
|
TimeFormat: time.RFC3339,
|
||||||
|
})
|
||||||
SetUp(LogConf{
|
SetUp(LogConf{
|
||||||
Mode: mode,
|
Mode: mode,
|
||||||
Level: "error",
|
Level: "info",
|
||||||
Path: "/dev/null",
|
Path: "/dev/null",
|
||||||
Stat: false,
|
|
||||||
})
|
})
|
||||||
const message = "hello there"
|
const message = "hello there"
|
||||||
Info(message)
|
Info(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user