feat(botfilter): add TestCompileConfigRejectsInvalidCIDR
This commit is contained in:
1 parent
1183a20295
commit
69bb300958
1 file changed
+7
@@ -174,3 +174,10 @@ func TestTrustedProxyHeaderSeparatesClients(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCompileConfigRejectsInvalidCIDR(t *testing.T) {
|
||||
cfg := CreateConfig()
|
||||
cfg.WhitelistCIDRs = []string{"not-a-cidr"}
|
||||
if _, err := compileConfig(cfg); err == nil {
|
||||
t.Fatal("compileConfig() error = nil, want invalid CIDR error")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user