@@ -0,0 +1,18 @@
|
||||
package config
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestStrictEnvironmentParsing(t *testing.T) {
|
||||
t.Setenv("CHECK_CONCURRENCY", "not-a-number")
|
||||
if _, err := Load(); err == nil {
|
||||
t.Fatal("expected invalid CHECK_CONCURRENCY to fail instead of silently using a default")
|
||||
}
|
||||
}
|
||||
|
||||
func TestStrictBooleanParsing(t *testing.T) {
|
||||
t.Setenv("CHECK_CONCURRENCY", "8")
|
||||
t.Setenv("AUTH_DISABLED", "sometimes")
|
||||
if _, err := Load(); err == nil {
|
||||
t.Fatal("expected invalid AUTH_DISABLED to fail")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user