[日志审计]增加删除、清理和别的一些设置

This commit is contained in:
刘祥超
2020-12-02 20:31:29 +08:00
parent 4c0f97e03c
commit 73e5d60326
9 changed files with 320 additions and 3 deletions

View 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")
}