fix im server shared database config

This commit is contained in:
richjohnrambo
2026-09-22 16:45:24 +08:00
parent b8c93e8d6a
commit e4416da04a
11 changed files with 114 additions and 140 deletions
+3 -3
View File
@@ -263,13 +263,13 @@ func TestTenantAuthIsolation(t *testing.T) {
}
}
}
createTenant := func(code, dbName string) types.TenantID {
createTenant := func(code, _ string) types.TenantID {
var id int64
if err := db.Get(&id, "SELECT COALESCE(MAX(id),0)+1 FROM im_tenant"); err != nil {
t.Fatal(err)
}
_, err := db.Exec("INSERT INTO im_tenant(id,code,name,db_name,state,created_by,updated_by) VALUES(?,?,?,?,?,?,?)",
id, code+suffix, code, dbName, types.TenantStateActive, 0, 0)
_, err := db.Exec("INSERT INTO im_tenant(id,code,name,state,created_by,updated_by) VALUES(?,?,?,?,?,?)",
id, code+suffix, code, types.TenantStateActive, 0, 0)
if err != nil {
t.Fatal(err)
}