Commit Graph

202 Commits

Author SHA1 Message Date
Sandro Santilli
fe2c6bfe1f Add test for DELETE .. RETURNING (#50) 2012-09-17 16:50:15 +02:00
Sandro Santilli
adfe97bf81 Add test for broken SQL (#51) 2012-09-17 13:04:16 +02:00
Sandro Santilli
8b824801cf Fix INSERT and UPDATE with RETURNING clause. Closes #50
Includes regression test
2012-09-17 11:50:19 +02:00
Sandro Santilli
2d59de1b70 Add a couple of additional tests about forbidden INSERT attempts.
These are:
 - NO api key used
 - INSERT in public table
Both tests are already passing
2012-09-17 11:12:00 +02:00
Sandro Santilli
167e1e1b51 Drop calls to deprecated PSQL.end() 2012-09-04 12:31:50 +02:00
Sandro Santilli
0a53d1cd17 Make PSQL.end a no-op, to avoid breaking pooled clients. Closes #48 2012-09-04 12:31:38 +02:00
Sandro Santilli
2a817fc70a Re-enable pgsql unit test
Was intended to disabled by 86e1439c2c
but commenting out the middle of a multiline string resulted in a
wider testcases omission, due to:
test/run_tests.sh: 42: test/acceptance/app.test.js: Permission denied
2012-09-04 11:22:53 +02:00
Sandro Santilli
d5a6002e2e Fix db_base_name and db_user setting for staging environment 2012-09-04 11:16:11 +02:00
Luis Bosque
86e1439c2c Re-enabled the psql connections pooler. It is
essential.

Related to:
e36bfdef5b
2012-08-29 20:52:17 +02:00
Sandro Santilli
8815b9eb3d Fix --domain command line switch for cdbsql 2012-08-08 11:58:03 +02:00
Sandro Santilli
185aa3f834 Add command line tool for the CartoDB SQL API 2012-08-08 11:42:11 +02:00
Sandro Santilli
4723c028c9 Use the correct redis variable for checking map key (closes #44)
Includes testcase
2012-08-02 12:18:54 +02:00
Sandro Santilli
639eea00cc Merge branch 'develop' 2012-07-16 19:14:37 +02:00
Sandro Santilli
5a13ba8ee8 Update section about node version requirement 2012-07-16 19:13:03 +02:00
Sandro Santilli
2ae5119bae Raise express dependency to 2.5.11 where it also work with node-0.8
This version passed "make check" with:
 - node 0.4.10
 - node 0.6.19
 - node 0.8.2
2012-07-16 19:10:50 +02:00
Sandro Santilli
7f8ab22c56 Require "zlib":"1.0.5", which would be needed by node-0.4 2012-07-16 19:03:22 +02:00
Sandro Santilli
acb625b72f Expect correct JSON, never mind formatting of it
This is because express-3.0.0beta6 send indented JSON ...
2012-07-16 17:16:28 +02:00
Sandro Santilli
b1089a3ccb Lock dependent modules versions 2012-07-16 15:40:01 +02:00
Sandro Santilli
8fb65874f0 Fix hang in app.auth.test.js and enable running on make check
Closes #38 (yay!)
2012-07-16 13:41:44 +02:00
Sandro Santilli
192bc736ca Disable http client connection pooling while running tests
This is a workaround for issue #38
2012-07-16 13:38:40 +02:00
Sandro Santilli
adae0b483e Enable app acceptance test (no hang with right pgsql version)
See issue #38
2012-07-13 11:13:20 +02:00
Sandro Santilli
aee257c5ef Do not leak "tmp" variable to globals 2012-07-13 11:11:30 +02:00
Sandro Santilli
ce4f99fa7f Print body on unexpected non-200 response status 2012-07-13 11:01:32 +02:00
Sandro Santilli
f7451e9bd8 Update after port to mocha 2012-07-13 10:30:46 +02:00
Sandro Santilli
e4f3a94256 Port tests to mocha. Closes #35. 2012-07-13 10:29:09 +02:00
JM
c881d991a6 Support case insensitive in format parameter. Closes #30
Also fixes https://github.com/Vizzuality/cartodb/issues/795
2012-07-13 10:24:12 +02:00
Sandro Santilli
538d9850a0 Reuse the same log file for both redis and db preparator 2012-07-12 22:55:34 +02:00
Sandro Santilli
1462c3ed3e Hide errors from dropdb (expected the first time) 2012-07-12 22:38:15 +02:00
Sandro Santilli
89d74970e1 Give more info on unexpected response status code 2012-07-12 22:09:14 +02:00
Sandro Santilli
6a2e0a338a Add versions for postgresql and cartodb requirements
This is because the CDB_QueryTables is used by the core: is provided
by CartoDB and only works with PostgreSQL 9.0+
2012-07-12 22:05:09 +02:00
Sandro Santilli
0c0770bcd4 Enable psql test now that it doesn't hang anymore 2012-07-12 20:16:38 +02:00
Sandro Santilli
e36bfdef5b Block while connecting, fixing #37
See https://github.com/brianc/node-postgres/issues/81
2012-07-12 20:13:47 +02:00
Sandro Santilli
a307e1434e Enable more tests (all the one succeeding for me). Closes #36
The metadata test was probably failing due to the redis_pool test
not waiting for redis to complete before exiting (or something
like that).
2012-07-12 18:21:39 +02:00
Sandro Santilli
debc0c2586 Run tests on "make check", using custom port for redis
Includes tweaks in the db preparation script and in the tests
for proper handling of async model. Only a single test is run
at the moment, being the only one that succeeded for me.
2012-07-12 18:10:56 +02:00
strk
e6b4896338 Merge pull request #33 from jmnavarro/issue-14
Allow using without redis (closes #14)

... as long as OAuth is not used and database name is given in URL
2012-07-12 08:31:24 -07:00
strk
b9ccad7133 Merge pull request #34 from jmnavarro/issue-13
Send number of affected rows as "row count" for non-select queries (closes #13)
2012-07-12 08:22:33 -07:00
JM
7e1847bca5 fixed #13
from support: Different JSON result for non-query request
http://support.cartodb.com/discussions/suggestions/50-sql-api-different-json-object-for-non-query-request
2012-06-30 02:34:43 +02:00
JM
b65d947b5a skip redis when database is hardcoded 2012-06-30 01:54:53 +02:00
JM
907b0b0df5 skip redis with non-oauth requests 2012-06-30 01:54:21 +02:00
Simon Tokumine
6edc510bfe Merge branch 'release/minibump' 2012-06-06 19:48:32 +01:00
Simon Tokumine
374583e655 add tests and refactor validations for input parameters. closes #29 2012-06-06 19:47:21 +01:00
Simon Tokumine
fb61c32850 add acceptance test for default dp change in geojson 2012-06-06 18:57:50 +01:00
Simon Tokumine
4986f86a9c Merge branch 'develop' of github.com:Vizzuality/CartoDB-SQL-API into develop 2012-06-01 21:19:08 +01:00
Simon Tokumine
9d2410fb32 updated readme to reflect api key: 2012-06-01 21:19:02 +01:00
Simon Tokumine
22923e3f0f formatting and semi colons 2012-06-01 21:13:41 +01:00
Simon Tokumine
aa1e306881 formatting and semi colons 2012-06-01 21:12:29 +01:00
Simon Tokumine
7c15a1218a remove redundant test" 2012-06-01 21:09:38 +01:00
Simon Tokumine
9e411425b3 formatting and semi colons 2012-06-01 21:07:22 +01:00
Simon Tokumine
39118d326f formatting and semi colons 2012-06-01 21:06:33 +01:00
Simon Tokumine
8735646675 fix oauth unit tests 2012-06-01 21:03:37 +01:00