🧪 relocate test logs

This commit is contained in:
Nanaloveyuki
2026-07-17 18:22:04 +08:00
parent a745cd5172
commit b18dcf972d
22 changed files with 137 additions and 99 deletions
+4 -4
View File
@@ -45,7 +45,7 @@ test "logger config parser reads formatter and queue options" {
///|
test "logger config parser reads file rotation options" {
let config = parse_logger_config_text(
"{\"sink\":{\"kind\":\"file\",\"path\":\"bitlogger.log\",\"rotation\":{\"max_bytes\":128,\"max_backups\":3}}}",
"{\"sink\":{\"kind\":\"file\",\"path\":\"logs/bitlogger.log\",\"rotation\":{\"max_bytes\":128,\"max_backups\":3}}}",
)
inspect(
match config.sink.kind {
@@ -54,7 +54,7 @@ test "logger config parser reads file rotation options" {
},
content="File",
)
inspect(config.sink.path, content="bitlogger.log")
inspect(config.sink.path, content="logs/bitlogger.log")
match config.sink.rotation {
Some(rotation) => {
inspect(rotation.max_bytes, content="128")
@@ -68,9 +68,9 @@ test "logger config parser reads file rotation options" {
///|
test "logger config parser prefers max_bytes_i64 when present" {
let config = parse_logger_config_text(
"{\"sink\":{\"kind\":\"file\",\"path\":\"bitlogger.log\",\"rotation\":{\"max_bytes\":128,\"max_bytes_i64\":\"4294967296\",\"max_backups\":3}}}",
"{\"sink\":{\"kind\":\"file\",\"path\":\"logs/bitlogger.log\",\"rotation\":{\"max_bytes\":128,\"max_bytes_i64\":\"4294967296\",\"max_backups\":3}}}",
)
inspect(config.sink.path, content="bitlogger.log")
inspect(config.sink.path, content="logs/bitlogger.log")
match config.sink.rotation {
Some(rotation) => {
inspect(rotation.max_bytes, content="2147483647")