Skip to content

Commit

Permalink
chore: fix merge mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
LeweyM committed May 20, 2024
1 parent 140d1b7 commit fc4c603
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class LimitDBRedis extends EventEmitter {
erlParams = utils.getERLParams(params.elevated_limits);
const valError = validateERLParams(erlParams);
if (valError) {
return callback(valError)
return callback(valError);
}
}

Expand Down
12 changes: 0 additions & 12 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,6 @@ function resolveElevatedParams(erlParams, bucketKeyConfig) {
};
}

class LimitdRedisConfigurationError extends Error {
constructor(msg, extra) {
super();
this.name = this.constructor.name;
this.message = msg;
Error.captureStackTrace(this, this.constructor);
if (extra) {
this.extra = extra;
}
}
}

module.exports = {
buildBuckets,
buildBucket,
Expand Down
13 changes: 5 additions & 8 deletions test/db.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1338,14 +1338,11 @@ describe('LimitDBRedis', () => {
elevated_limits: {
size: 5,
per_minute: 1,
elevated_limits: {
size: 5,
per_minute: 1,
interval: 10,
}
});
await takeElevatedPromise(erlParams)
await takeElevatedPromise(erlParams) // erl activated
interval: 10,
}
});
await takeElevatedPromise(erlParams);
await takeElevatedPromise(erlParams); // erl activated
});

describe('when the limit is exceeded for a bucket without erl configuration', async () => {
Expand Down
1 change: 0 additions & 1 deletion test/utils.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('utils', () => {
}
};
const response = normalizeType(bucket);
// eslint-disable-next-line no-unused-vars
const { elevated_limits, ...rest } = response;
expect(rest).excluding(['drip_interval', 'overrides', 'overridesMatch', 'overridesCache']).to.deep.equal({
size: 100,
Expand Down

0 comments on commit fc4c603

Please sign in to comment.