mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
TestLogRotation add log output relative path
TestLogRotation add test log output relative path test
This commit is contained in:
parent
24d8e90dbc
commit
0e496ca212
@ -311,6 +311,11 @@ func TestLogRotation(t *testing.T) {
|
|||||||
logOutputs: []string{"stderr", "/tmp/path"},
|
logOutputs: []string{"stderr", "/tmp/path"},
|
||||||
logRotationConfig: `{"maxsize": 1}`,
|
logRotationConfig: `{"maxsize": 1}`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "log output relative path",
|
||||||
|
logOutputs: []string{"stderr", "tmp/path"},
|
||||||
|
logRotationConfig: `{"maxsize": 1}`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "no file targets",
|
name: "no file targets",
|
||||||
logOutputs: []string{"stderr"},
|
logOutputs: []string{"stderr"},
|
||||||
@ -368,6 +373,9 @@ func TestLogRotation(t *testing.T) {
|
|||||||
if err == nil && tt.wantErr {
|
if err == nil && tt.wantErr {
|
||||||
t.Errorf("test %q, expected error, got nil", tt.name)
|
t.Errorf("test %q, expected error, got nil", tt.name)
|
||||||
}
|
}
|
||||||
|
if err == nil {
|
||||||
|
cfg.GetLogger().Info("test log")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user