chore: 初始化 T-001 Go 骨架
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user