feat(api): add structured JSON access log with request-id correlation
This commit is contained in:
@@ -108,6 +108,32 @@ func TestLoad_GarminTokenStoreRootExplicitOverridesDefault(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoad_LogLevelDefaultsToInfo(t *testing.T) {
|
||||
setRequiredEnv(t)
|
||||
t.Setenv("GENIUSRUN_LOG_LEVEL", "")
|
||||
|
||||
cfg, err := Load()
|
||||
if err != nil {
|
||||
t.Fatalf("Load: %v", err)
|
||||
}
|
||||
if cfg.LogLevel != "info" {
|
||||
t.Errorf("LogLevel = %q, want default %q", cfg.LogLevel, "info")
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoad_LogLevelExplicitOverridesDefault(t *testing.T) {
|
||||
setRequiredEnv(t)
|
||||
t.Setenv("GENIUSRUN_LOG_LEVEL", "debug")
|
||||
|
||||
cfg, err := Load()
|
||||
if err != nil {
|
||||
t.Fatalf("Load: %v", err)
|
||||
}
|
||||
if cfg.LogLevel != "debug" {
|
||||
t.Errorf("LogLevel = %q, want debug", cfg.LogLevel)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoad_GarminPythonPathDefaultsToPython3(t *testing.T) {
|
||||
setRequiredEnv(t)
|
||||
t.Setenv("GARMIN_WRAPPER_PYTHON", "")
|
||||
|
||||
Reference in New Issue
Block a user