mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 01:20:25 +08:00
29 lines
396 B
Go
29 lines
396 B
Go
|
|
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")
|
||
|
|
}
|