Removes sql api specific test

This commit is contained in:
Raul Ochoa 2015-03-30 13:39:47 +02:00
parent 124133ceca
commit 55a78899a4

View File

@ -67,7 +67,6 @@ suite('server', function() {
suite.skip('server old_api', function() {
var redis_client = redis.createClient(global.environment.redis.port);
var sqlapi_server;
var test_database = _.template(global.environment.postgres_auth_user, {user_id:1}) + '_db';
@ -225,39 +224,6 @@ suite.skip('server old_api', function() {
);
});
if (!cdbQueryTablesFromPostgresEnabledValue) { // only test if it was a post if it's using the SQL API
test("passes hostname header to sqlapi", function(done){
var qo = {
sql: "SELECT * from gadm4",
map_key: 1234
};
step(
function sendRequest() {
var next = this;
assert.response(server, {
headers: {host: 'localhost'},
url: '/tiles/gadm4/6/31/24.png?' + querystring.stringify(qo),
method: 'GET'
},{}, function(res) { next(null, res); });
},
function checkResponse(err, res) {
if ( err ) throw err;
assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body);
var last_request = sqlapi_server.getLastRequest();
assert.ok(last_request);
var host = last_request.headers.host;
assert.ok(host);
assert.equal(last_request.method, 'GET');
assert.equal(host, 'localhost.donot_look_this_up');
return null;
},
function finish(err) {
done(err);
}
);
});
}
if (!cdbQueryTablesFromPostgresEnabledValue) { // only test if it was using the SQL API
test("requests to skip cache on sqlapi error", function(done){
var qo = {