mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-24 22:16:36 +08:00
节点根据健康检查自动上下线
This commit is contained in:
@@ -2,6 +2,7 @@ package models
|
||||
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -20,3 +21,12 @@ func TestNodeDAO_FindChangedClusterIds(t *testing.T) {
|
||||
}
|
||||
t.Log(clusterIds)
|
||||
}
|
||||
|
||||
func TestNodeDAO_UpdateNodeUp(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
isChanged, err := SharedNodeDAO.UpdateNodeUp(57, false, 3, 3)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("changed:", isChanged)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user