Fix crash when issuing SQL "COPY" command
This involved upgrade of node-postgresql module. See https://github.com/brianc/node-postgres/issues/242
This commit is contained in:
parent
ef729a027f
commit
19fc0e5854
1
NEWS.md
1
NEWS.md
@ -2,6 +2,7 @@
|
||||
-----
|
||||
* Improve mixed-geometry export error message (#78)
|
||||
* Remove NULL the_geom features from topojson output (#80)
|
||||
* Fix crash when issuing SQL "COPY" command
|
||||
|
||||
1.3.3 (11/01/13)
|
||||
-----
|
||||
|
10
npm-shrinkwrap.json
generated
10
npm-shrinkwrap.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cartodb_api",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"dependencies": {
|
||||
"cluster2": {
|
||||
"version": "0.3.5-cdb02",
|
||||
@ -185,8 +185,12 @@
|
||||
}
|
||||
},
|
||||
"pg": {
|
||||
"version": "0.8.7-cdb1",
|
||||
"from": "git://github.com/CartoDB/node-postgres.git#cdb_production"
|
||||
"version": "0.11.2",
|
||||
"dependencies": {
|
||||
"generic-pool": {
|
||||
"version": "2.0.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"generic-pool": {
|
||||
"version": "1.0.12"
|
||||
|
@ -13,7 +13,7 @@
|
||||
"express": "~2.5.11",
|
||||
"underscore" : "1.1.x",
|
||||
"underscore.string": "1.1.5",
|
||||
"pg": "git://github.com/CartoDB/node-postgres.git#cdb_production",
|
||||
"pg": "~0.11.2",
|
||||
"generic-pool": "1.0.x",
|
||||
"redis": "0.7.1",
|
||||
"hiredis": "*",
|
||||
|
@ -330,24 +330,23 @@ test('CREATE TABLE with GET and auth', function(done){
|
||||
});
|
||||
});
|
||||
|
||||
// TODO: test COPY
|
||||
//test('COPY TABLE with GET and auth', function(done){
|
||||
// assert.response(app, {
|
||||
// url: "/api/v1/sql?" + querystring.stringify({
|
||||
// q: 'COPY TABLE test_table FROM stdin; 1\n\\.\n',
|
||||
// api_key: 1234
|
||||
// }),
|
||||
// headers: {host: 'vizzuality.cartodb.com'},
|
||||
// method: 'GET'
|
||||
// },{}, function(res) {
|
||||
// assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body);
|
||||
// // Check cache headers
|
||||
// // See https://github.com/Vizzuality/CartoDB-SQL-API/issues/43
|
||||
// assert.equal(res.headers['x-cache-channel'], 'NONE');
|
||||
// assert.equal(res.headers['cache-control'], expected_cache_control);
|
||||
// done();
|
||||
// });
|
||||
//});
|
||||
// Test effects of COPY
|
||||
// See https://github.com/Vizzuality/cartodb-management/issues/1502
|
||||
test('COPY TABLE with GET and auth', function(done){
|
||||
assert.response(app, {
|
||||
url: "/api/v1/sql?" + querystring.stringify({
|
||||
q: 'COPY test_table FROM stdin;',
|
||||
api_key: 1234
|
||||
}),
|
||||
headers: {host: 'vizzuality.cartodb.com'},
|
||||
method: 'GET'
|
||||
},{}, function(res) {
|
||||
// We expect a problem, actually
|
||||
assert.equal(res.statusCode, 400, res.statusCode + ': ' + res.body);
|
||||
assert.deepEqual(JSON.parse(res.body), {"error":["COPY from stdin failed: No source stream defined"]});
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('ALTER TABLE with GET and auth', function(done){
|
||||
assert.response(app, {
|
||||
|
Loading…
Reference in New Issue
Block a user