Test: Avoid requiring specific search paths for tests

This commit is contained in:
Raúl Marín 2020-04-16 18:35:29 +02:00
parent 349c4d72c4
commit 195ff3c9f1
3 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ describe('cache headers', function () {
assert.response(server, { assert.response(server, {
url: `/api/v1/sql?${qs.encode({ url: `/api/v1/sql?${qs.encode({
api_key: '1234', api_key: '1234',
q: `select CDB_TableMetadataTouch('${tableName}'::regclass)` q: `select cartodb.CDB_TableMetadataTouch('${tableName}'::regclass)`
})}`, })}`,
headers: { headers: {
host: 'vizzuality.cartodb.com' host: 'vizzuality.cartodb.com'

View File

@ -92,7 +92,7 @@ describe('Surrogate-Key header', function () {
}); });
it('should not add header for CDB_QueryTables', function (done) { it('should not add header for CDB_QueryTables', function (done) {
var sql = "SELECT CDB_QueryTablesText('select * from untitle_table_4')"; var sql = "SELECT cartodb.CDB_QueryTablesText('select * from untitle_table_4')";
assert.response(server, createGetRequest(sql), RESPONSE_OK, function (err, res) { assert.response(server, createGetRequest(sql), RESPONSE_OK, function (err, res) {
assert.ifError(err); assert.ifError(err);
assert.ok(!Object.prototype.hasOwnProperty.call(res, 'surrogate-key'), res.headers['surrogate-key']); assert.ok(!Object.prototype.hasOwnProperty.call(res, 'surrogate-key'), res.headers['surrogate-key']);

View File

@ -93,7 +93,7 @@ describe('X-Cache-Channel header', function () {
}); });
it('should not add header for CDB_QueryTables', function (done) { it('should not add header for CDB_QueryTables', function (done) {
var sql = "SELECT CDB_QueryTablesText('select * from untitle_table_4')"; var sql = "SELECT cartodb.CDB_QueryTablesText('select * from untitle_table_4')";
assert.response(server, createGetRequest(sql), RESPONSE_OK, function (err, res) { assert.response(server, createGetRequest(sql), RESPONSE_OK, function (err, res) {
assert.ifError(err); assert.ifError(err);
assert.ok(!Object.prototype.hasOwnProperty.call(res.headers, 'x-cache-channel'), res.headers['x-cache-channel']); assert.ok(!Object.prototype.hasOwnProperty.call(res.headers, 'x-cache-channel'), res.headers['x-cache-channel']);