1.4.5.2
This commit is contained in:
25
EdgeAPI/internal/tasks/health_check_executor_test.go
Normal file
25
EdgeAPI/internal/tasks/health_check_executor_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
//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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user