From 23149ce7bf8e28d2abfa3354d1b963a50c87a8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Mart=C3=ADn?= Date: Thu, 28 Feb 2019 16:55:01 +0100 Subject: [PATCH] remving length test --- test/acceptance/log.js | 43 ------------------------------------------ 1 file changed, 43 deletions(-) diff --git a/test/acceptance/log.js b/test/acceptance/log.js index a5c016b2..937f9e1b 100644 --- a/test/acceptance/log.js +++ b/test/acceptance/log.js @@ -12,7 +12,6 @@ const QUERY = `SELECT 14 as foo`; const API_KEY = 1234; const logQueries = global.settings.logQueries; -const maxQueriesLogLength = global.settings.maxQueriesLogLength; describe('Log middleware', function() { before(function() { @@ -205,46 +204,4 @@ describe('Log middleware', function() { ); }); }); - - describe('modify queries log length', function() { - before(function() { - global.settings.maxQueriesLogLength = 2; - }); - - after(function() { - global.settings.maxQueriesLogLength = maxQueriesLogLength; - }); - - it(`GET query`, function(done) { - assert.response(server, - { - method: 'GET', - url: '/api/v1/sql?' + qs.stringify({ - q: QUERY, - api_key: API_KEY - }), - headers: { - host: 'vizzuality.cartodb.com' - } - }, - { statusCode: 200 }, - function(err, res) { - assert.ok(!err); - - assert.ok(res.headers['x-sqlapi-log']); - const log = JSON.parse(res.headers['x-sqlapi-log']); - assert.deepEqual(log, { - request: { - sql: { - type: TYPES.QUERY, - sql: QUERY.substring(0, global.settings.maxQueriesLogLength) - } - } - }); - - return done(); - } - ); - }); - }); });