Use inline execution in camshaft instead of a database service stub

This commit is contained in:
Raul Ochoa
2016-04-14 17:25:08 +02:00
parent a26025b259
commit da602eeda0
3 changed files with 9 additions and 30 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ describe('analysis-layers', function() {
});
});
it.skip('should fail for non-authenticated requests that has a node other than "source"', function(done) {
it('should fail for non-authenticated requests that has a node other than "source"', function(done) {
var useCase = useCases[1];
// No API key here
+1 -23
View File
@@ -12,29 +12,7 @@ var helper = require('./test_helper');
var CartodbWindshaft = require('../../lib/cartodb/server');
var serverOptions = require('../../lib/cartodb/server_options');
function createServiceStub(result) {
return function(__, callback) {
return callback(null, result);
};
}
function AnalysisDatabaseServiceStub(/*dbParams, batchParams*/) {
// this.dbParams = dbParams;
// this.batchParams = batchParams;
}
AnalysisDatabaseServiceStub.prototype = {
run: createServiceStub({}),
getSchema: createServiceStub([]),
getColumnNames: createServiceStub([]),
getLastUpdatedTimeFromAffectedTables: createServiceStub([]),
setUpdatedAtForSources: createServiceStub([]),
registerAnalysisInCatalog: createServiceStub([]),
queueAnalysisOperations: createServiceStub([]),
trackAnalysis: createServiceStub([]),
enqueue: createServiceStub({})
};
serverOptions.analysis.batch.databaseService = AnalysisDatabaseServiceStub;
serverOptions.analysis.batch.inlineExecution = true;
var server = new CartodbWindshaft(serverOptions);
function TestClient(mapConfig, apiKey) {