优化结构

This commit is contained in:
Yvan
2026-08-20 20:46:18 +08:00
parent 01b5c2f78a
commit 23bc29ce0f
67 changed files with 1594 additions and 465 deletions
+3 -2
View File
@@ -8,6 +8,7 @@ import (
"testing"
"kra/internal/conf"
"kra/internal/integration/storage"
"google.golang.org/protobuf/encoding/protojson"
"gopkg.in/yaml.v3"
@@ -239,7 +240,7 @@ func TestPersistRuntimeConfigReplacesActiveStorage(t *testing.T) {
Local: &conf.AdminBackend_Local{StorePath: oldRoot, PathPrefix: "old-files"},
Storage: &conf.AdminBackend_Storage{Type: "local"},
}
currentStorage, err := buildFileStorage(currentAdmin)
currentStorage, err := storage.NewReloadable(currentAdmin)
if err != nil {
t.Fatal(err)
}
@@ -248,7 +249,7 @@ func TestPersistRuntimeConfigReplacesActiveStorage(t *testing.T) {
d := &Data{
runtime: conf.NewRuntime(&conf.Data{}, currentAdmin),
gormDB: reloadableDB,
storage: &reloadableStorage{current: currentStorage},
storage: currentStorage,
}
d.databaseReady.Store(true)