Skip to content

Commit

Permalink
TestLogRotation add log output relative path
Browse files Browse the repository at this point in the history
TestLogRotation add test log output relative path test
  • Loading branch information
mumuhhh authored and hexfusion committed Jun 9, 2021
1 parent fed3bc3 commit 98bbc01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/embed/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ func TestLogRotation(t *testing.T) {
logOutputs: []string{"stderr", "/tmp/path"},
logRotationConfig: `{"maxsize": 1}`,
},
{
name: "log output relative path",
logOutputs: []string{"stderr", "tmp/path"},
logRotationConfig: `{"maxsize": 1}`,
},
{
name: "no file targets",
logOutputs: []string{"stderr"},
Expand Down Expand Up @@ -361,6 +366,9 @@ func TestLogRotation(t *testing.T) {
if err == nil && tt.wantErr {
t.Errorf("test %q, expected error, got nil", tt.name)
}
if err == nil {
cfg.GetLogger().Info("test log")
}
})
}
}

0 comments on commit 98bbc01

Please sign in to comment.