using the new config params

This commit is contained in:
Simon Martín
2018-02-20 18:17:25 +01:00
parent ae0ec159e1
commit 7464d827fe
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ function setLimit(count, period, burst) {
describe('rate limit acceptance', function() {
before(function() {
global.environment.enabledFeatures.rateLimitsEnabled = true;
global.environment.enabledFeatures.rateLimitsByEndpoint.endpoint1 = true;
global.environment.enabledFeatures.rateLimitsByEndpoint.anonymous = true;
redisClient = redis.createClient(global.environment.redis.port);
testClient = new TestClient(createMapConfig(), 1234);
@@ -90,7 +90,7 @@ describe('rate limit acceptance', function() {
after(function() {
global.environment.enabledFeatures.rateLimitsEnabled = false;
global.environment.enabledFeatures.rateLimitsByEndpoint.endpoint1 = false;
global.environment.enabledFeatures.rateLimitsByEndpoint.anonymous = false;
});
afterEach(function(done) {
+2 -2
View File
@@ -41,7 +41,7 @@ function getReqAndRes() {
describe('rate limit unit', function() {
before(function() {
global.environment.enabledFeatures.rateLimitsEnabled = true;
global.environment.enabledFeatures.rateLimitsByEndpoint.endpoint8 = true;
global.environment.enabledFeatures.rateLimitsByEndpoint.tile = true;
const redisPool = new RedisPool(global.environment.redis);
const metadataBackend = cartodbRedis({pool: redisPool});
@@ -52,7 +52,7 @@ describe('rate limit unit', function() {
after(function() {
global.environment.enabledFeatures.rateLimitsEnabled = false;
global.environment.enabledFeatures.rateLimitsByEndpoint.endpoint8 = false;
global.environment.enabledFeatures.rateLimitsByEndpoint.tile = false;
keysToDelete.forEach( key => {
redisClient.del(key);