节点IP阈值增加节点健康检查失败

This commit is contained in:
GoEdgeLab
2021-11-18 14:30:53 +08:00
parent fd3ccfe0d1
commit ead3718c57
8 changed files with 191 additions and 41 deletions

View File

@@ -40,3 +40,25 @@ func TestNodeIPAddressDAO_LoopTasks(t *testing.T) {
}
t.Log("ok")
}
func TestNodeIPAddressDAO_FindAddressIsHealthy(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
isHealthy, err := SharedNodeIPAddressDAO.FindAddressIsHealthy(tx, 1)
if err != nil {
t.Fatal(err)
}
t.Log("isHealthy:", isHealthy)
}
func TestNodeIPAddressDAO_UpdateAddressHealthCount(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
isChanged, err := SharedNodeIPAddressDAO.UpdateAddressHealthCount(tx, 1, true, 3, 3)
if err != nil {
t.Fatal(err)
}
t.Log("isChanged:", isChanged)
}