mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 01:20:25 +08:00
26 lines
552 B
Go
26 lines
552 B
Go
//go:build plus
|
|
// +build plus
|
|
|
|
package tasks_test
|
|
|
|
import (
|
|
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
|
|
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
|
"github.com/iwind/TeaGo/dbs"
|
|
"testing"
|
|
)
|
|
|
|
func TestHealthCheckExecutor_Run(t *testing.T) {
|
|
teaconst.IsPlus = true
|
|
dbs.NotifyReady()
|
|
|
|
var executor = tasks.NewHealthCheckExecutor(42)
|
|
results, err := executor.Run()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
for _, result := range results {
|
|
t.Log(result.Node.Name, "addr:", result.NodeAddr, "isOk:", result.IsOk, "error:", result.Error)
|
|
}
|
|
}
|