chore: 初始化 T-001 Go 骨架

This commit is contained in:
ila
2026-07-06 20:54:23 +08:00
parent baff3ae0ef
commit 7b5a90a104
11 changed files with 295 additions and 20 deletions
+20
View File
@@ -0,0 +1,20 @@
package config
import "testing"
func TestLoadExampleConfig(t *testing.T) {
cfg, err := Load("../config.yaml.example")
if err != nil {
t.Fatalf("Load example config: %v", err)
}
if cfg.OSI.BaseURL == "" {
t.Fatal("OSI base_url should have a placeholder value")
}
if cfg.OSI.TimeoutSec != 20 {
t.Fatalf("OSI timeout_sec = %d, want 20", cfg.OSI.TimeoutSec)
}
if cfg.ReportLogFileDir != "logs" {
t.Fatalf("report_log_file_dir = %q, want logs", cfg.ReportLogFileDir)
}
}