Skip to content

Commit

Permalink
[horus] fix test error (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfordjody authored Oct 3, 2024
1 parent 5999e73 commit fa4562e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/horus/base/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type RecoveryConfiguration struct {

type ModularConfiguration struct {
Enabled bool `yaml:"enabled"`
dailyLimit map[string]int `yaml:"dailyLimit"`
DailyLimit map[string]int `yaml:"dailyLimit"`
AbnormalityQL map[string]string `yaml:"abnormalityQL"`
RecoveryQL map[string]string `yaml:"recoveryQL"`
IntervalSecond int `yaml:"intervalSecond"`
Expand Down
4 changes: 2 additions & 2 deletions app/horus/base/db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (

func TestDataBase(t *testing.T) {
mc := &config.MysqlConfiguration{
Addr: "root:root@tcp(127.0.0.1:3306)/horus?charset=utf8&parseTime=True",
Debug: true,
Address: "root:root@tcp(127.0.0.1:3306)/horus?charset=utf8&parseTime=True",
Debug: true,
}

err := db.InitDataBase(mc)
Expand Down
2 changes: 1 addition & 1 deletion app/horus/core/horuser/node_modular.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (h *Horuser) CustomizeModularNodes(clusterName, moduleName, nodeName, ip st
alerter.DingTalkSend(h.cc.CustomModular.DingTalk, msg)
alerter.SlackSend(h.cc.CustomModular.Slack, msg)

dailyLimit := h.cc.CustomModular.CordonDailyLimit[moduleName]
dailyLimit := h.cc.CustomModular.DailyLimit[moduleName]
if len(data) > dailyLimit {
msg := fmt.Sprintf("\n【日期:%v】\n【集群:%v\n\n【今日 Cordon 节点数: %v】\n【已达到今日上限: %v】\n【节点:%v】",
data, clusterName, len(data), dailyLimit, nodeName)
Expand Down

0 comments on commit fa4562e

Please sign in to comment.