Skip to content

Commit a59d8a1

Browse files
committed
Update RedisRateLimitStore.spec.ts
Signed-off-by: Logan Nguyen <[email protected]>
1 parent 03109f3 commit a59d8a1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/relay/tests/lib/services/rateLimiterService/RedisRateLimitStore.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('RedisRateLimitStore Test Suite', function () {
7373
rateLimitStoreFailureCounter,
7474
);
7575

76-
const result = await store.incrementAndCheck(testKey, testLimit, requestDetails);
76+
const result = await store.incrementAndCheck(testKey, testLimit);
7777

7878
expect(result).to.be.false;
7979
expect(mockRedisClient.eval.calledOnce).to.be.true;
@@ -94,7 +94,7 @@ describe('RedisRateLimitStore Test Suite', function () {
9494
rateLimitStoreFailureCounter,
9595
);
9696

97-
const result = await store.incrementAndCheck(testKey, testLimit, requestDetails);
97+
const result = await store.incrementAndCheck(testKey, testLimit);
9898

9999
expect(result).to.be.true;
100100
});
@@ -110,7 +110,7 @@ describe('RedisRateLimitStore Test Suite', function () {
110110
rateLimitStoreFailureCounter,
111111
);
112112

113-
const result = await store.incrementAndCheck(testKey, testLimit, requestDetails);
113+
const result = await store.incrementAndCheck(testKey, testLimit);
114114

115115
expect(result).to.be.false; // Fail open
116116
});
@@ -128,7 +128,7 @@ describe('RedisRateLimitStore Test Suite', function () {
128128

129129
const counterSpy = sinon.spy(rateLimitStoreFailureCounter, 'inc');
130130

131-
await store.incrementAndCheck(testKey, testLimit, requestDetails);
131+
await store.incrementAndCheck(testKey, testLimit);
132132

133133
expect(counterSpy.calledOnce).to.be.true;
134134
});
@@ -139,7 +139,7 @@ describe('RedisRateLimitStore Test Suite', function () {
139139

140140
const store = new RedisRateLimitStore(mockRedisClient as unknown as RedisClientType, logger, testDuration); // No failure counter
141141

142-
const result = await store.incrementAndCheck(testKey, testLimit, requestDetails);
142+
const result = await store.incrementAndCheck(testKey, testLimit);
143143

144144
expect(result).to.be.false; // Should still fail open
145145
});
@@ -155,7 +155,7 @@ describe('RedisRateLimitStore Test Suite', function () {
155155
rateLimitStoreFailureCounter,
156156
);
157157

158-
const result = await store.incrementAndCheck(testKey, testLimit, requestDetails);
158+
const result = await store.incrementAndCheck(testKey, testLimit);
159159

160160
expect(result).to.be.false; // Should still fail open
161161
});
@@ -174,7 +174,7 @@ describe('RedisRateLimitStore Test Suite', function () {
174174
rateLimitStoreFailureCounter,
175175
);
176176

177-
await store.incrementAndCheck(testKey, testLimit, requestDetails);
177+
await store.incrementAndCheck(testKey, testLimit);
178178

179179
expect(loggerSpy.calledOnce).to.be.true;
180180
});
@@ -190,7 +190,7 @@ describe('RedisRateLimitStore Test Suite', function () {
190190
rateLimitStoreFailureCounter,
191191
);
192192

193-
await store.incrementAndCheck(testKey, testLimit, requestDetails);
193+
await store.incrementAndCheck(testKey, testLimit);
194194

195195
const evalCall = mockRedisClient.eval.getCall(0);
196196
const evalOptions = evalCall.args[1] as { keys: string[]; arguments: string[] };
@@ -208,7 +208,7 @@ describe('RedisRateLimitStore Test Suite', function () {
208208
rateLimitStoreFailureCounter,
209209
);
210210

211-
await store.incrementAndCheck(testKey, testLimit, requestDetails);
211+
await store.incrementAndCheck(testKey, testLimit);
212212

213213
const evalCall = mockRedisClient.eval.getCall(0);
214214
const evalOptions = evalCall.args[1] as { keys: string[]; arguments: string[] };

0 commit comments

Comments
 (0)