Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nikooo777 committed Feb 15, 2025
1 parent 0809aef commit 0cdfdd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firewall/firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestCheckIPAccess(t *testing.T) {
endpoint := "/api/v1/example"
WindowSize = 7 * time.Second
// Test the first five accesses for an IP don't exceed the limit
for i := 1; i <= 6; i++ {
for i := 1; i <= MaxStringsPerIp; i++ {
result, _ := CheckAndRateLimitIp(ip, endpoint+strconv.Itoa(i))
assert.False(t, result, "Expected result to be false, got %v for endpoint %s", result, endpoint+strconv.Itoa(i))
}
Expand Down

0 comments on commit 0cdfdd6

Please sign in to comment.