mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
test(log): expand handler, config, and metrics coverage
This commit is contained in:
14
internal/config/config_test.go
Normal file
14
internal/config/config_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package config
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestLoad_LogDSNOverride(t *testing.T) {
|
||||
t.Setenv("EZ_LOG_PG_DSN", "host=log-db user=postgres dbname=logs")
|
||||
cfg, err := Load()
|
||||
if err != nil {
|
||||
t.Fatalf("load config: %v", err)
|
||||
}
|
||||
if cfg.Log.DSN != "host=log-db user=postgres dbname=logs" {
|
||||
t.Fatalf("expected log dsn to be set, got %q", cfg.Log.DSN)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user