Merge pull request #1005 from trheyi/main

Set default prefix in Prepare function for test environment
This commit is contained in:
Max 2025-07-16 17:05:36 +08:00 committed by GitHub
commit f0489a3838
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -187,6 +187,11 @@ func Prepare(t *testing.T, cfg config.Config, rootEnv ...string) {
t.Fatal(err)
}
// Set default prefix
if share.App.Prefix == "" {
share.App.Prefix = "yao_"
}
utils.Init()
dbconnect(t, cfg)
load(t, cfg)