chore: add ROOT_DIR environment variable, refactor

This commit is contained in:
yusing
2025-04-14 06:25:06 +08:00
parent 5cdbe81beb
commit d8eff90acc
12 changed files with 56 additions and 59 deletions

View File

@@ -56,7 +56,7 @@ func TestFileProviderValidate(t *testing.T) {
cfg := config.DefaultConfig()
if tt.init != nil {
for _, filename := range tt.filenames {
filepath := path.Join(common.ConfigBasePath, filename)
filepath := path.Join(common.ConfigDir, filename)
assert.NoError(t, tt.init(filepath))
}
}
@@ -67,7 +67,7 @@ func TestFileProviderValidate(t *testing.T) {
})), cfg)
if tt.cleanup != nil {
for _, filename := range tt.filenames {
filepath := path.Join(common.ConfigBasePath, filename)
filepath := path.Join(common.ConfigDir, filename)
assert.NoError(t, tt.cleanup(filepath))
}
}