删除库存和旧回调管理
This commit is contained in:
@@ -28,7 +28,7 @@ test('shouldWriteLog respects configured minimum log level', () => {
|
||||
|
||||
test('resolveLogFilePath uses daily log file names by channel', () => {
|
||||
assert.match(resolveLogFilePath('app', '2026-04-14T10:00:00.000Z'), /app-2026-04-14\.log$/)
|
||||
assert.match(resolveLogFilePath('webhook', '2026-04-14T10:00:00.000Z'), /webhook-2026-04-14\.log$/)
|
||||
assert.match(resolveLogFilePath('integration', '2026-04-14T10:00:00.000Z'), /integration-2026-04-14\.log$/)
|
||||
})
|
||||
|
||||
test('resolveExpiredLogFilenames keeps latest seven days and ignores unknown files', () => {
|
||||
@@ -37,17 +37,17 @@ test('resolveExpiredLogFilenames keeps latest seven days and ignores unknown fil
|
||||
'app-2026-04-13.log',
|
||||
'app-2026-04-08.log',
|
||||
'app-2026-04-07.log',
|
||||
'webhook-2026-04-06.log',
|
||||
'integration-2026-04-06.log',
|
||||
'app.log',
|
||||
'webhook.log',
|
||||
'integration.log',
|
||||
'random.txt',
|
||||
], '2026-04-14T12:00:00.000Z', 7)
|
||||
|
||||
assert.deepEqual(expired, [
|
||||
'app-2026-04-07.log',
|
||||
'webhook-2026-04-06.log',
|
||||
'integration-2026-04-06.log',
|
||||
'app.log',
|
||||
'webhook.log',
|
||||
'integration.log',
|
||||
])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user