Skip to content

Commit 334e859

Browse files
committed
Test against in-memory fallback disabled
1 parent ce82ee9 commit 334e859

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

httprateredis_test.go

+8-7
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ import (
1313

1414
func TestRedisCounter(t *testing.T) {
1515
limitCounter, err := httprateredis.NewRedisLimitCounter(&httprateredis.Config{
16-
Host: "localhost",
17-
Port: 6379,
18-
MaxIdle: 500,
19-
MaxActive: 500,
20-
DBIndex: 0,
21-
ClientName: "httprateredis_test",
22-
PrefixKey: fmt.Sprintf("httprate:test:%v", rand.Int31n(100000)), // Unique key for each test
16+
Host: "localhost",
17+
Port: 6379,
18+
MaxIdle: 500,
19+
MaxActive: 500,
20+
DBIndex: 0,
21+
ClientName: "httprateredis_test",
22+
PrefixKey: fmt.Sprintf("httprate:test:%v", rand.Int31n(100000)), // Unique key for each test
23+
FallbackDisabled: true,
2324
})
2425
if err != nil {
2526
t.Fatalf("redis not available: %v", err)

0 commit comments

Comments
 (0)