test(06-14): fetchguard IANA boundary and zoned dial tests, surf edge coverage

This commit is contained in:
Jakub Zych
2026-09-21 19:48:06 +02:00
parent f1218f2c84
commit e50e2dd632
4 changed files with 157 additions and 5 deletions

View File

@@ -267,3 +267,17 @@ func TestBodyLimitBoundsBodyConsumingMiddleware(t *testing.T) {
}
})
}
func TestBodyLimitInvalidParamFailsBoot(t *testing.T) {
for _, param := range []string{"abc", "0", "-5", ""} {
t.Run(param, func(t *testing.T) {
cfg := writeHTTPConfig(t, "body_limits:\n default_bytes: 4\n upload_bytes: 8\n")
_, err := Assemble(backpack.New(cfg), []party.Plugin{bodyProbePlugin{
id: "golem15.probe", use: []string{"body.limit:" + param},
}})
if err == nil || !strings.Contains(err.Error(), "body.limit") {
t.Fatalf("err = %v", err)
}
})
}
}