From 57d61c1ba341ab0cef1c26a7d2fd380655e93742 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 16 Jul 2025 17:05:05 +0800 Subject: [PATCH] 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. --- test/utils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/utils.go b/test/utils.go index 4ede489c..b7eb088f 100644 --- a/test/utils.go +++ b/test/utils.go @@ -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)