Initial commit (code only without large binaries)
This commit is contained in:
21
EdgeAPI/internal/tasks/dns_task_executor_test.go
Normal file
21
EdgeAPI/internal/tasks/dns_task_executor_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
//go:build !plus
|
||||
|
||||
package tasks_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestDNSTaskExecutor_Loop(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
|
||||
var task = tasks.NewDNSTaskExecutor(10 * time.Second)
|
||||
err := task.Loop()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("ok")
|
||||
}
|
||||
Reference in New Issue
Block a user