Commit Graph

197 Commits

Author SHA1 Message Date
Daniel García Aubert
30dab7df9f Extract authorize middeware form prepareContext 2018-03-15 18:48:29 +01:00
Daniel García Aubert
afff06c7e6 Extract db-conn-setup middleware for prepare-context 2018-03-15 15:33:20 +01:00
Eneko Lakasta
5ad1e1b645 merge master 2018-03-12 11:52:38 +01:00
Eneko Lakasta
8d22ca66ba fix tests 2018-03-06 15:26:35 +01:00
Eneko Lakasta
e84d88b7a3 remove test 2018-02-15 17:53:15 +01:00
Eneko Lakasta
cda2616a8a get and check api key credentials from api key: username and token 2018-02-15 17:49:47 +01:00
Eneko Lakasta
11aa4d12bd add tests for getting api key token from requests 2018-02-15 15:27:41 +01:00
Eneko Lakasta
140441b777 fix test 2018-02-15 12:53:01 +01:00
Eneko Lakasta
5db0e9c8d8 add middleware for apikeyToken 2018-02-15 12:50:42 +01:00
Eneko Lakasta
6b5d6648de fix unit test 2018-02-07 17:14:46 +01:00
Raul Ochoa
f7f513a61a Add urlTemplate URLs to metadata
This is useful when using client libraries like leaflet.
2018-01-03 20:53:03 +00:00
Raul Ochoa
3ceeaedf02 Fix test after breaking it with linting changes 2018-01-03 16:19:14 +00:00
Raul Ochoa
c6ba9e6102 Fix linting 2018-01-03 16:10:09 +00:00
Raul Ochoa
95dfd87c96 Add test cases for getTilesUrls 2018-01-03 16:04:31 +01:00
Raul Ochoa
eab9e8846e Reorg suite to accommodate getTileURLs 2018-01-03 12:57:01 +00:00
Raul Ochoa
d7f4d39aa2 Don't not override the full client but only the provided methods 2017-12-28 18:09:41 +00:00
Simon Martín
a57cd25bec test escape chars function 2017-12-18 12:35:44 +01:00
Simon Martín
ba3af551e3 update test file name 2017-11-30 15:04:38 +01:00
Simon Martín
555d3f558c changing error log structure 2017-11-28 18:22:55 +01:00
Simon Martín
479b8be639 ensuring errored JSONP write a error status code in log 2017-11-28 17:27:05 +01:00
Simon Martín
100a2986b9 ensuring all properties in errors headers 2017-11-27 18:43:48 +01:00
Simon Martín
752bfe779e forgotten 'only' 2017-11-27 18:15:27 +01:00
Simon Martín
8cf878f723 testing X-Tiler-Errors existence 2017-11-27 18:14:02 +01:00
Simon Martín
8380d291d0 Merge branch 'master' into middlewarify 2017-10-10 14:59:50 +02:00
Simon Martín
e3405ea2fc doing changes after merge with middlewarify 2017-10-09 12:27:58 +02:00
Simon Martín
5c0f597cbb Merge branch 'middlewarify' into res-locals 2017-10-09 10:55:43 +02:00
Daniel García Aubert
c70b8cb5bf Set X-Served-By-DB-Host header in db-conn-setup middleware 2017-10-05 18:05:46 +02:00
Simon Martín
06138a82a8 Merge branch 'middlewarify' into res-locals 2017-10-05 17:53:15 +02:00
Daniel García Aubert
678fbb1c8f Remove bad argument to middleware callback 2017-10-05 17:28:41 +02:00
Simon Martín
5abe25c316 undo style/format changes 2017-10-05 11:35:49 +02:00
Simon Martín
1c3f2b93e3 prepareRequest and prepareResponse in prepare-context.test 2017-10-03 17:58:16 +02:00
Simon Martín
21720267cf from req.context to res.locals 2017-10-03 17:47:57 +02:00
Simon Martín
c894414192 going green 2017-10-02 12:28:29 +02:00
Simon Martín
aa62529041 updating preprare-context test to allow the new res.locals usage 2017-10-02 12:09:19 +02:00
Raul Ochoa
78b75c7a88 Removes list dataview type 2017-09-28 10:47:44 +00:00
Daniel García Aubert
b236112069 Split prepare context middleware and fix unit test 2017-09-25 13:40:22 +02:00
Daniel García Aubert
85d4c81e58 Remove legacy hack 2017-09-22 18:15:48 +02:00
Daniel García Aubert
ff19a8a2fe Rename test 2017-09-22 17:59:51 +02:00
Daniel García Aubert
3bab081438 Rename req2params by prepareContext 2017-09-22 17:56:47 +02:00
Simon
c09899913f finishing integration of lzma middleware 2017-09-22 16:46:39 +02:00
Simon
9d81321d78 Merge branch 'master' into middlewarify 2017-09-22 16:26:56 +02:00
Simon Martín
ca63c2ef1a Merge pull request #721 from CartoDB/lzma-middleware
Implement LZMA query param inflating as middleware
2017-09-22 16:16:36 +02:00
Daniel García Aubert
9bd862ffaf Remove req2params from BaseController and update related test to use the middleware 2017-09-22 01:08:46 +02:00
Daniel García Aubert
429f070372 Pass node's response object to req2params 2017-09-21 12:22:33 +02:00
Daniel García Aubert
daeae5d95c Implement error-middleware to handle errors at top level 2017-09-21 11:46:42 +02:00
Daniel García Aubert
d0f5ebd7ab Restore statsClient after performing test 2017-08-11 17:55:55 +02:00
Raul Ochoa
399561d076 Implement LZMA query param inflating as middleware
The req2params method is doing too many things,
this is an initial step to do fewer things in that method.
2017-08-04 17:30:46 +02:00
Javier Goizueta
e01730e8e4 Syntax fixes 2017-08-03 19:16:08 +02:00
Javier Goizueta
eed33fc76d Add tests for excluding NaNs, Ininities from ramps 2017-08-03 19:07:02 +02:00
Javier Goizueta
31557b06be Add test to detect and fix incorrect bbox filter splitting
When bbox crosses date line and is split in two, the eastern box wasn't correct
2017-05-31 11:09:51 -04:00
Daniel García Aubert
c65518cf41 Get back layer-stats from windshaft-stats 2017-05-17 20:16:43 +02:00
Raul Ochoa
cad02bfad7 Remove all conditional branches to call req.profiler
req.profiler is created in a middleware for all requests.
2017-03-30 20:31:53 +02:00
Raul Ochoa
2da834784f Generate URLs for resources based on CDN + template rules 2017-03-22 18:58:37 +01:00
Daniel García Aubert
eb758bbf36 Use a valid port from env 2016-12-19 16:19:41 +01:00
Raul Ochoa
c539d4fbbd Change camshaft naming from filters 2016-07-06 21:11:39 +02:00
Raul Ochoa
aaacad81e7 Add bbox unit tests 2016-06-01 19:05:46 +02:00
Raul Ochoa
f602ea88e2 Convert widgets from layers into dataviews
It also converts filters so full dataviews backend is reusable, that removes
widgets backend dependency.
2016-05-26 19:32:58 +02:00
Raul Ochoa
c667e64d7f Simplify test as we just validate val value 2016-05-26 11:36:03 +02:00
Raul Ochoa
5c3dd8b09d validate execution order 2016-05-26 11:30:28 +02:00
Raul Ochoa
f7c528277b Add tests for generic MapConfig adapter 2016-05-26 11:23:19 +02:00
Raul Ochoa
ba08745c23 Adds hasTokens method to SubstitutionTokens 2016-05-19 12:10:19 +02:00
Javier Goizueta
3987e83b7a Add tests for query rewriter with filters 2016-05-18 12:34:51 +02:00
Javier Goizueta
858d976637 Add tests for query rewriter using specific zoom level 2016-05-18 11:53:30 +02:00
Javier Goizueta
a0445b5cdd 💄 Fix indentation
2 spaces were used instead of 4 in some places
2016-04-20 17:47:43 +02:00
Javier Goizueta
1d4ddd373b Remove unneeded callback from synchronous tests 2016-04-20 17:27:52 +02:00
Javier Goizueta
7902b276ad Support unneeded schema names in overviews queries
Fixes #420
Keep table schema of overviews base tables and use it
to support queries that use the schema name when not
strictly needed.
2016-04-19 22:50:05 +02:00
Javier Goizueta
fa2e884605 Support overviews for named layer wrapped queries
Fix #405
2016-04-01 15:40:44 +02:00
Javier Goizueta
4e40a61795 Change form of overviews queries so they can be optimized
The PostgreSQL planner wasn't applying the spatial filtering of
tile bounds to the queries efficiently.
2016-03-02 19:25:08 +01:00
Javier Goizueta
0a218da835 Implement an Overviews query rewriter
Use the Windshaft query-rewriter interface to adapt queries so
they use available overview tables.

This requires a version of Windshaft that implements the query-rewriter
interface (package.json/npm-shrinkwap.json have yet to be updated)
2016-02-04 10:26:31 +01:00
Raul Ochoa
d6ecb8c793 Remove trailing whitespace 2016-01-28 19:44:25 +01:00
Raul Ochoa
3181bcc63e Remove app dependency from controllers 2015-09-30 18:00:54 +02:00
Raul Ochoa
79375616d5 Default host to empty string when header is not found
A String object is required to not fail on `.match` interface.
2015-09-30 16:31:56 +02:00
Raul Ochoa
51db76ac41 Ask for specific redis key removal 2015-09-25 17:59:00 +02:00
Raul Ochoa
8339e4a4cb Remove redis keys used in tests after each test 2015-09-25 14:08:59 +02:00
Raul Ochoa
b368463670 Use describe instead of suite 2015-09-25 13:31:51 +02:00
Raul Ochoa
5e1bc3e199 Named map updates does not emit update event if template didn't change
closes #323
2015-09-23 19:59:39 +02:00
Raul Ochoa
16468b1216 remove console.log 2015-09-18 16:45:35 +02:00
Raul Ochoa
30cba053da Check there is no unexepcted keys on redis after tests 2015-09-17 15:07:54 +02:00
Raul Ochoa
95398354e3 require test helper 2015-09-17 13:58:22 +02:00
Raul Ochoa
208dd209a4 Merge branch 'standalone-server' into standalone-server-express-4
Conflicts:
	lib/cartodb/controllers/base.js
2015-09-17 12:57:33 +02:00
Raul Ochoa
9139feaa30 Move error message handling test to unit 2015-09-17 12:48:29 +02:00
Raul Ochoa
beabe48aec Upgrade express, adds body-parser
- basic changes in server
- basic changes in unit tests
2015-09-17 00:19:00 +02:00
Raul Ochoa
38e422e84c Moves sendError and sendResponse to Base controller
Test for findStatusCode moved to controller
2015-09-16 21:54:56 +02:00
Raul Ochoa
e32ced107e Fix all ported tests related to req2params 2015-09-16 18:09:39 +02:00
Raul Ochoa
66f94d9452 Fix test 2015-09-16 02:49:18 +02:00
Raul Ochoa
fba5a35514 Move sendResponse and sendError to response object 2015-09-15 19:28:02 +02:00
Raul Ochoa
f5660667c8 Move req.profiler call to req2params itself 2015-09-15 18:16:50 +02:00
Raul Ochoa
3f7202d89c Port tests for stats 2015-09-14 19:07:53 +02:00
Raul Ochoa
2d3088ba27 Port everything related to stats from windshaft 2015-09-14 18:47:01 +02:00
Raul Ochoa
116da64e5c More strict cyclomatic complexity check 2015-07-15 15:10:59 +02:00
Raul Ochoa
9c6c63c167 More strict jshint 2015-07-15 15:03:28 +02:00
Raul Ochoa
f9554ec761 Re-enable render limits 2015-07-10 19:10:55 +02:00
Raul Ochoa
9bece712a9 Splits controllers and supports after layergroup creation actions 2015-07-10 11:24:32 +02:00
Raul Ochoa
c81048312d Context with user 2015-07-08 15:34:46 +02:00
Raul Ochoa
725ff41fb1 Ports tile stats tests from windshaft 2015-07-08 00:19:11 +02:00
Raul Ochoa
d071fe6d0c Ports windshaft server unit tests 2015-07-08 00:12:32 +02:00
Raul Ochoa
2d3f2667ca Standalone server initial implementation
- no dependency over Windshaft.Server
2015-07-04 20:41:22 +02:00
Raul Ochoa
c6f9152efe Moves template maps to backends directory 2015-06-29 16:38:13 +02:00
Raul Ochoa
3f0d344313 Changes rules for names in templates
Now valid names can start with numbers and can contain dashes (-).
Closes #306
2015-06-04 10:41:40 -04:00
Raul Ochoa
26545af9ae fix jshint 2015-04-27 18:03:15 +02:00