mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-18 20:00:25 +08:00
[日志审计]增加删除、清理和别的一些设置
This commit is contained in:
28
internal/tasks/log_task_test.go
Normal file
28
internal/tasks/log_task_test.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLogTask_loopClean(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
|
||||
task := NewLogTask()
|
||||
err := task.loopClean(5)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("ok")
|
||||
}
|
||||
|
||||
func TestLogTask_loopMonitor(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
|
||||
task := NewLogTask()
|
||||
err := task.loopMonitor(10)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("ok")
|
||||
}
|
||||
Reference in New Issue
Block a user