WAF多个相同Key的cc2统计规则不再重复累加

This commit is contained in:
GoEdgeLab
2022-07-25 09:34:34 +08:00
parent e15d491b97
commit 4b55895428
57 changed files with 189 additions and 179 deletions

View File

@@ -18,7 +18,7 @@ func TestRequestAllCheckpoint_RequestValue(t *testing.T) {
}
checkpoint := new(RequestAllCheckpoint)
v, _, sysErr, userErr := checkpoint.RequestValue(requests.NewTestRequest(req), "", nil)
v, _, sysErr, userErr := checkpoint.RequestValue(requests.NewTestRequest(req), "", nil, 1)
if sysErr != nil {
t.Fatal(sysErr)
}
@@ -42,7 +42,7 @@ func TestRequestAllCheckpoint_RequestValue_Max(t *testing.T) {
}
checkpoint := new(RequestBodyCheckpoint)
value, _, err, _ := checkpoint.RequestValue(requests.NewTestRequest(req), "", nil)
value, _, err, _ := checkpoint.RequestValue(requests.NewTestRequest(req), "", nil, 1)
if err != nil {
t.Fatal(err)
}
@@ -65,6 +65,6 @@ func BenchmarkRequestAllCheckpoint_RequestValue(b *testing.B) {
checkpoint := new(RequestAllCheckpoint)
for i := 0; i < b.N; i++ {
_, _, _, _ = checkpoint.RequestValue(requests.NewTestRequest(req), "", nil)
_, _, _, _ = checkpoint.RequestValue(requests.NewTestRequest(req), "", nil, 1)
}
}