Upgrade camshaft to get error node-id
This commit is contained in:
parent
ac94118798
commit
66a898cdc2
@ -20,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "~1.14.0",
|
"body-parser": "~1.14.0",
|
||||||
"camshaft": "0.54.3",
|
"camshaft": "cartodb/camshaft#master",
|
||||||
"cartodb-psql": "0.8.0",
|
"cartodb-psql": "0.8.0",
|
||||||
"cartodb-query-tables": "0.2.0",
|
"cartodb-query-tables": "0.2.0",
|
||||||
"cartodb-redis": "0.13.2",
|
"cartodb-redis": "0.13.2",
|
||||||
|
@ -373,5 +373,70 @@ describe('analysis-layers error cases', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should return "function does not exist" indicating the node_id and context', function(done) {
|
||||||
|
var mapConfig = createMapConfig([{
|
||||||
|
"type": "cartodb",
|
||||||
|
"options": {
|
||||||
|
"source": {
|
||||||
|
"id": "HEAD"
|
||||||
|
},
|
||||||
|
"cartocss": '#polygons { polygon-fill: red; }',
|
||||||
|
"cartocss_version": "2.3.0"
|
||||||
|
}
|
||||||
|
}], {}, [{
|
||||||
|
"id": "HEAD",
|
||||||
|
"type": "buffer",
|
||||||
|
"params": {
|
||||||
|
"source": {
|
||||||
|
"id": "HEAD2",
|
||||||
|
"type": "buffer",
|
||||||
|
"params": {
|
||||||
|
"source": {
|
||||||
|
"id": "HEAD3",
|
||||||
|
"type": 'deprecated-sql-function',
|
||||||
|
"params": {
|
||||||
|
"id": "HEAD4",
|
||||||
|
"function_name": 'DEP_EXT_does_not_exist_fn',
|
||||||
|
"primary_source": {
|
||||||
|
"type": 'source',
|
||||||
|
"params": {
|
||||||
|
"query": "select * from populated_places_simple_reduced"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"function_args": ['wadus']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"radius": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"radius": 10
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
var testClient = new TestClient(mapConfig, 1234);
|
||||||
|
|
||||||
|
testClient.getLayergroup(ERROR_RESPONSE, function(err, layergroupResult) {
|
||||||
|
assert.ok(!err, err);
|
||||||
|
|
||||||
|
assert.equal(layergroupResult.errors.length, 1);
|
||||||
|
assert.equal(
|
||||||
|
layergroupResult.errors[0],
|
||||||
|
'function dep_ext_does_not_exist_fn(unknown, unknown, unknown, text[], unknown) does not exist'
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.equal(layergroupResult.errors_with_context[0].type, 'analysis');
|
||||||
|
assert.equal(
|
||||||
|
layergroupResult.errors_with_context[0].message,
|
||||||
|
'function dep_ext_does_not_exist_fn(unknown, unknown, unknown, text[], unknown) does not exist'
|
||||||
|
);
|
||||||
|
assert.equal(layergroupResult.errors_with_context[0].analysis.id, 'HEAD');
|
||||||
|
assert.equal(layergroupResult.errors_with_context[0].analysis.type, 'buffer');
|
||||||
|
assert.equal(layergroupResult.errors_with_context[0].analysis.node_id, 'HEAD3');
|
||||||
|
|
||||||
|
testClient.drain(done);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -194,9 +194,9 @@ camelcase@^3.0.0:
|
|||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
|
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
|
||||||
|
|
||||||
camshaft@0.54.3:
|
camshaft@cartodb/camshaft#master:
|
||||||
version "0.54.3"
|
version "0.54.4"
|
||||||
resolved "https://registry.yarnpkg.com/camshaft/-/camshaft-0.54.3.tgz#ba0b0fc00c5f82dc5d6b7d7649ed3412f6a9902b"
|
resolved "https://codeload.github.com/cartodb/camshaft/tar.gz/76bcf3dfe41f5aa6e2b181de22628fb30e1a880e"
|
||||||
dependencies:
|
dependencies:
|
||||||
async "^1.5.2"
|
async "^1.5.2"
|
||||||
bunyan "1.8.1"
|
bunyan "1.8.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user