Commit Graph

843 Commits

Author SHA1 Message Date
Daniel García Aubert
1905a2bd28 Please, jshint 2019-04-04 15:16:44 +02:00
Daniel García Aubert
2e2e233b68 Use 'bunyan' logger instead of 'debug' to log debug messages 2019-04-04 14:31:41 +02:00
Simon Martín
23149ce7bf remving length test 2019-02-28 16:55:01 +01:00
Simon Martín
9cf68f2f16 Batch API Queries with fallbacks tests 2019-02-28 16:02:34 +01:00
Simon Martín
52e4dfa728 using the new TYPES 2019-02-28 11:49:05 +01:00
Simon Martín
d5470ac556 testing config parameters usage 2019-02-27 12:50:23 +01:00
Simon Martín
c53ed67252 typo 2019-02-27 11:57:36 +01:00
Simon Martín
1c6cb293d4 testing log middleware 2019-02-27 10:09:08 +01:00
Simon Martín
cd6bbaddab remove 'only' 2019-02-26 16:29:07 +01:00
Simon Martín
157786a7bd batch queries tests 2019-02-26 16:22:39 +01:00
Simon Martín
9f4adbc3de Handle query middleware failing tests 2019-02-26 15:43:14 +01:00
Simon Martín
9ab3f71f03 Handle query middleware acceptance test 2019-02-26 15:37:03 +01:00
Simon Martín
799b767505 remove old query log system 2019-02-26 13:58:01 +01:00
Daniel García Aubert
26f8ccc3cf Drop support for Node.js 6, npm 3, Postgres 9.5, PostGIS 2.2, and Redis 3 2019-02-21 18:55:27 +01:00
Daniel G. Aubert
76a7053414
version 6 to 6.9.2 in travis
Co-Authored-By: oleurud <oleurud@pm.me>
2019-02-13 10:48:09 +01:00
Simon Martín
3eae5ec5ab test with new docker image 2019-02-12 18:52:57 +01:00
Daniel García Aubert
955b72a87c Upgrade to mocha 5 to fix vulns 2019-01-16 18:13:17 +01:00
Simon Martín
60702faa57 adding Authorization to Access-Control-Allow-Headers 2019-01-10 15:55:08 +01:00
Raul Marin
03701ae695 Set platform limits message on streaming responses too 2019-01-02 16:21:33 +01:00
Raul Marin
7eb412cf59 Test: Accept PG11 error messages 2019-01-02 16:21:33 +01:00
Rafa de la Torre
2f8357ee4f Properly mock Date.now() for tests 2018-12-11 11:50:53 +01:00
Rafa de la Torre
aeec1922ee Fix test and add const #543 2018-12-05 19:15:57 +01:00
Rafa de la Torre
b6251568eb Test first, with hardcoded values (WIP) #543 2018-12-05 18:59:11 +01:00
Rafa de la Torre
8505857412 Make error_handler.test.js independent from other tests #543
This is needed to avoid a "test race" and get it closer to a real unit
test.

When running it along with others it passes:

```
$ make test-unit
...
  48 passing (54ms)
  12 pending
```

(note it relies on the ordering produced by `find`)

when running it along with some other test that reads the config, it
works as well:

```
$ test/run_tests.sh  test/unit/apikeyauth.test.js test/unit/error_handler.test.js
...
  3 passing (9ms)
  12 pending
```

but when run in isolation, it fails:

```
$ test/run_tests.sh test/unit/error_handler.test.js
...
  0 passing (15ms)
  3 failing

  1) error-handler should return a header with errors:
     TypeError: Cannot read property 'environment' of undefined
      at errorMiddleware (app/middlewares/error.js:10:28)
      at Context.<anonymous> (test/unit/error_handler.test.js:53:26)

  2) error-handler JSONP should return a header with error statuscode:
     TypeError: Cannot read property 'environment' of undefined
      at errorMiddleware (app/middlewares/error.js:10:28)
      at Context.<anonymous> (test/unit/error_handler.test.js:79:26)

  3) error-handler should escape chars that broke logs regex:
     TypeError: Cannot read property 'environment' of undefined
      at errorMiddleware (app/middlewares/error.js:10:28)
      at Context.<anonymous> (test/unit/error_handler.test.js:108:26)
```
2018-12-05 16:22:48 +01:00
Simon Martín
4dbd4d8b80 tests ensuring cancel query with Quota exceeded or max POST size 2018-11-29 18:42:04 +01:00
Daniel García Aubert
35dd404a0b Rename lock files before installing with different versions of npm 2018-11-07 20:24:14 +01:00
Daniel García Aubert
99b92c65fe Run configure before installing 2018-11-07 19:21:46 +01:00
Daniel García Aubert
721bf139b3 Install dependencies depending on the version of Node.js while running CI 2018-11-07 19:03:52 +01:00
Daniel García Aubert
54343162a3 Be able run CI test agaisnt Node.js 6 and 10 2018-11-07 18:37:05 +01:00
Daniel García Aubert
a616982ec3 Use strict mode 2018-10-24 15:42:33 +02:00
Rafa de la Torre
a927a6993a Add a test to reproduce the issue w/ COPY TO #590 2018-09-17 16:46:09 +02:00
Simon Martín
cc9e6eae43 new tmpDir more verbose 2018-08-30 15:10:43 +02:00
Simon Martín
a0db81369a forgotten .only (shame on me) 2018-08-30 15:06:07 +02:00
Simon Martín
3468353876 ensure tmpDir test 2018-08-30 12:50:50 +02:00
Simon Martín
e008eb66df remove only 2018-08-10 14:40:23 +02:00
Simon Martín
c0ea5be5d3 Improve gzip error message 2018-08-10 14:38:50 +02:00
Rafa de la Torre
8a76df8884 Fix for unhandled gunzip/zlib errors #528 2018-08-10 12:37:49 +02:00
Rafa de la Torre
6193f58dd2 Test for faulty gzip headers scenario 2018-08-10 12:15:31 +02:00
Rafa de la Torre
942b0073d8 Please jshint
As suggested by jshint:
- Remove the unused `res` return value
- Add a semicolon at the end of the file
2018-07-30 12:36:16 +02:00
Rafa de la Torre
2afe845d78 More descriptive comment about the intent of the code
As suggested in review comment.
2018-07-30 12:34:29 +02:00
Rafa de la Torre
bf1d5bf3b4 Early return instead of if/else
As suggested in review comment.
2018-07-30 12:31:57 +02:00
Rafa de la Torre
7277143c27 Merge remote-tracking branch 'origin/master' into 521-test-robustness-pgbouncer 2018-07-25 15:07:55 +02:00
Rafa de la Torre
75f25a6c02 Test for the max POST size 2018-07-23 16:58:05 +02:00
Rafa de la Torre
a8e538aba4 Test for COPY TO and DB quota 2018-07-23 16:20:15 +02:00
Rafa de la Torre
7b405cee5d Add test for DB quota exceeded 2018-07-23 16:14:10 +02:00
Rafa de la Torre
153ae3ea3d Fix test: increase timeout for DB quota middleware
In order to give the DB quota middleware a chance of getting executed,
increase the 1 ms timeout to 10 ms. This is short but enough, as the
quota mocks are constant functions.
2018-07-23 15:36:13 +02:00
Rafa de la Torre
44858df713 Add a mock for DB quota functions 2018-07-23 15:29:53 +02:00
Rafa de la Torre
fdab0136e6 Fix copy/paste test 2018-07-20 16:17:44 +02:00
Rafa de la Torre
ce409b4925 Fix typo in test describe 2018-07-20 16:09:10 +02:00
Rafa de la Torre
0f8e1f43c4 Add more tests for copy_timeout 2018-07-20 15:57:36 +02:00