提供批量更新服务配置API(阶段性提交)

This commit is contained in:
GoEdgeLab
2023-04-06 20:49:22 +08:00
parent a217b5483e
commit fbc7d307d8
16 changed files with 680 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package models_test
import (
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/iwind/TeaGo/dbs"
"testing"
)
func TestServerDAO_CopyServerConfigToServers(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
var dao = models.NewServerDAO()
err := dao.CopyServerConfigToServers(tx, 10170, []int64{23, 10171}, serverconfigs.ConfigCodeStat)
if err != nil {
t.Fatal(err)
}
}