test(06-14): fetchguard IANA boundary and zoned dial tests, surf edge coverage
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user