节点根据健康检查自动上下线

This commit is contained in:
刘祥超
2020-11-15 21:17:42 +08:00
parent 2eb81b52a0
commit 58cae9a5e5
13 changed files with 450 additions and 183 deletions

View File

@@ -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)
}