19 lines
478 B
Go
19 lines
478 B
Go
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")
|
|
}
|
|
}
|