Require latest grainstore and windshaft stable releases

Fixes some http response status to be 400 rather than 500
This commit is contained in:
Sandro Santilli
2013-01-29 13:13:14 +01:00
parent 42b3d0ab9c
commit 8d5baebf1d
3 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -187,7 +187,7 @@
"version": "1.3.3"
},
"grainstore": {
"version": "0.10.9",
"version": "0.10.10",
"dependencies": {
"carto": {
"version": "0.9.3-cdb2",
@@ -254,7 +254,7 @@
}
},
"windshaft": {
"version": "0.8.2",
"version": "0.8.3",
"dependencies": {
"express": {
"version": "2.5.11",
+2 -2
View File
@@ -21,8 +21,8 @@
"cluster2": "git://github.com/CartoDB/cluster2.git#cdb_production",
"node-varnish": "0.1.1",
"underscore" : "~1.3.3",
"grainstore" : "~0.10.9",
"windshaft" : "~0.8.2",
"grainstore" : "~0.10.10",
"windshaft" : "~0.8.3",
"step": "0.0.x",
"generic-pool": "1.0.x",
"redis": "0.7.2",
+8 -8
View File
@@ -110,7 +110,7 @@ suite('server', function() {
},{
}, function(res) {
// FIXME: should be 401 Unauthorized
assert.equal(res.statusCode, 500, res.body);
assert.equal(res.statusCode, 400, res.body);
assert.deepEqual(JSON.parse(res.body),
{error: 'Sorry, you are unauthorized (permission denied)'});
done();
@@ -127,7 +127,7 @@ suite('server', function() {
},{
}, function(res) {
// FIXME: should be 401 Unauthorized
assert.equal(res.statusCode, 500, res.body);
assert.equal(res.statusCode, 400, res.statusCode + ': ' + res.body);
assert.deepEqual(JSON.parse(res.body),
{error:"missing unknown_user's dbname in redis (try CARTODB/script/restore_redis)"});
done();
@@ -175,7 +175,7 @@ suite('server', function() {
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: '#my_table3{backgxxxxxround-color:#fff;}'})
},{
status: 500, // FIXME: should be 400 !
status: 400,
body: /Unrecognized rule: backgxxxxxround-color/
}, function() { done(); });
});
@@ -187,7 +187,7 @@ suite('server', function() {
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: '#my_table3{'})
},{
status: 500, // FIXME: should be 400 !
status: 400,
body: /Missing closing/
}, function() { done(); });
});
@@ -199,7 +199,7 @@ suite('server', function() {
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: '#my_table4{backgxxxxxround-color:#fff;foo:bar}'})
},{
status: 500, // FIXME: should be 400 !
status: 400,
}, function(res) {
var parsed = JSON.parse(res.body);
assert.equal(parsed.length, 2);
@@ -252,7 +252,7 @@ suite('server', function() {
data: querystring.stringify({style: 'Map { background-color:#aaa; }'})
},{}, function(res) {
// FIXME: should be 401 Unauthorized
assert.equal(res.statusCode, 500, res.body);
assert.equal(res.statusCode, 400, res.statusCode + ': ' + res.body);
assert.ok(res.body.indexOf('map state cannot be changed by unauthenticated request') != -1, res.body);
assert.response(server, {
@@ -464,7 +464,7 @@ suite('server', function() {
method: 'GET'
},{}, function(res) {
// FIXME: should be 401 Unauthorized
assert.equal(res.statusCode, 500, res.body);
assert.equal(res.statusCode, 500, res.statusCode + ': ' + res.body);
done();
});
});
@@ -479,7 +479,7 @@ suite('server', function() {
},{
}, function(res) {
// FIXME: should be 401 Unauthorized
assert.equal(res.statusCode, 500, res.body);
assert.equal(res.statusCode, 500, res.statusCode + ': ' + res.body);
assert.deepEqual(JSON.parse(res.body),
{error:"missing unknown_user's dbname in redis (try CARTODB/script/restore_redis)"});
done();