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(); - } - ); - }); - }); });