Set default prefix in Prepare function for test environment
- Added logic to set a default prefix of "yao_" for the application if none is provided, ensuring consistent naming conventions in the test setup.
This commit is contained in:
parent
d5dd0f56c7
commit
57d61c1ba3
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue