This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new fa4562e7 [horus] fix test error (#422)
fa4562e7 is described below
commit fa4562e73d9d04dcf443ab2322656112bcef0220
Author: mfordjody <[email protected]>
AuthorDate: Thu Oct 3 15:43:54 2024 +0800
[horus] fix test error (#422)
---
app/horus/base/config/config.go | 2 +-
app/horus/base/db/db_test.go | 4 ++--
app/horus/core/horuser/node_modular.go | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/horus/base/config/config.go b/app/horus/base/config/config.go
index 846dbf2a..9dba5301 100644
--- a/app/horus/base/config/config.go
+++ b/app/horus/base/config/config.go
@@ -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"`
diff --git a/app/horus/base/db/db_test.go b/app/horus/base/db/db_test.go
index 90438c9a..b150f8d3 100644
--- a/app/horus/base/db/db_test.go
+++ b/app/horus/base/db/db_test.go
@@ -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)
diff --git a/app/horus/core/horuser/node_modular.go
b/app/horus/core/horuser/node_modular.go
index 7a178231..6ad3beba 100644
--- a/app/horus/core/horuser/node_modular.go
+++ b/app/horus/core/horuser/node_modular.go
@@ -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)