From f594d40e0629356d76ccdf2154971b9262b5f11f Mon Sep 17 00:00:00 2001 From: yuanruji Date: Mon, 30 Sep 2024 14:48:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor(dbm-services):=20=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E6=89=A7=E8=A1=8Ccreate=20table=20like=20#7199?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-services/common/dbha/ha-module/test/agent_test.go | 2 +- dbm-services/mysql/db-simulation/handler/handler.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dbm-services/common/dbha/ha-module/test/agent_test.go b/dbm-services/common/dbha/ha-module/test/agent_test.go index f182dbc997..5177955d33 100644 --- a/dbm-services/common/dbha/ha-module/test/agent_test.go +++ b/dbm-services/common/dbha/ha-module/test/agent_test.go @@ -68,7 +68,7 @@ func TestAgentNetTransfor(t *testing.T) { case 3: dbIns.App = "APP4444" } - err = agentIns.ReporterGM(d) + err = agentIns.RepairGM(&gmInfo) if err != nil { t.Errorf("reporter gmInfo failed.err:%s", err.Error()) return diff --git a/dbm-services/mysql/db-simulation/handler/handler.go b/dbm-services/mysql/db-simulation/handler/handler.go index 813102608a..fe20d91a57 100644 --- a/dbm-services/mysql/db-simulation/handler/handler.go +++ b/dbm-services/mysql/db-simulation/handler/handler.go @@ -36,8 +36,9 @@ type Response struct { // CreateClusterParam 创建临时的spider的集群参数 type CreateClusterParam struct { - Pwd string `json:"pwd"` - PodName string `json:"podname"` + Pwd string `json:"pwd"` + PodName string `json:"podname"` + SpiderVersion string `json:"spider_version"` } // CreateTmpSpiderPodCluster 创建临时的spider的集群,多用于测试,debug @@ -55,8 +56,7 @@ func CreateTmpSpiderPodCluster(r *gin.Context) { Charset: "utf8mb4", } ps.DbImage = config.GAppConfig.Image.Tendb57Img - ps.TdbCtlImage = config.GAppConfig.Image.TdbCtlImg - ps.SpiderImage = config.GAppConfig.Image.SpiderImg + ps.TdbCtlImage, ps.SpiderImage = getSpiderAndTdbctlImg(param.SpiderVersion, LatestVersion) if err := ps.CreateClusterPod(); err != nil { logger.Error(err.Error()) return