Xavier Francisco and Steve Chávez
28b3d6cafd
Update stylish haskell config; apply all; add CI config ( #1299 )
...
* Update config default; Copy non-defaults
* Update .stylish-haskell config version to match pgrst
* Apply stylish haskell to all files
* CircleCI config
* Remove redundant import.
What is used from Network.HTTP.Types.Headers is also exported by Network.HTTP.Types.
* Grouped imports
* Show un-styled files on CircleCI failure
* Fix styling imports
* Apply adhoc standard correctly
2019-05-23 10:44:34 -05:00
steve-chavez
2044f77d49
Fix #1273 , don't ignore RPC arguments by default
...
* Add different error message for pg 9.4
2019-04-19 16:03:42 -05:00
Xavier Francisco and Steve Chávez
32725f2f35
Fix tests expected responses due to changes in pg11 ( #1268 )
2019-04-07 19:03:02 -05:00
Steve Chávez and GitHub
501edc718d
Add db-extra-search-path config ( #1218 )
...
For adding schemas to the search_path, solves issues related to extensions created in the public schema.
2018-12-08 11:39:31 -05:00
Russell Davies and Steve Chávez
473ac70789
Add support for parsing JSON Web Key Sets
2018-11-13 13:58:17 -05:00
steve-chavez
63ead89470
Fix #1181 , correct qualify of function argument type
2018-11-06 11:54:10 -05:00
steve-chavez
dc834572d6
Fix #1182 , fix subselect view embedding for pg10
2018-10-12 09:24:22 -05:00
Steve Chávez and GitHub
30b5859b28
Fix #1141 , app.settings resetting on pool timeout ( #1169 )
...
* Add test for ensuring app.settings don't reset
2018-08-20 11:02:03 -05:00
steve-chavez
30dfadec7b
Add support for getting json by array index
...
* Also support json negative array index
2018-06-19 11:17:59 -05:00
steve-chavez
2513c00039
Refactor Field type,move tests to JsonOperatorSpec
2018-06-19 11:17:59 -05:00
steve-chavez
5c87fe2704
Add getCurrentTime cache for jwt validation
2018-04-30 11:31:06 -05:00
steve-chavez
6675821c64
Allow PUT method: UPSERT of a single row
2018-02-21 07:33:54 -05:00
steve-chavez
85b1dc0eb4
Add UPSERT for POST with Prefer:resoultion=merge/ignore-duplicates
2018-02-21 07:33:54 -05:00
Duane Johnson and Joe Nelson
a46b6f5020
Pass custom settings to the DB's SESSION ( #1063 )
...
- allows queries to refer to current_setting('app.settings.foo') to retrieve variables
- useful for 12-factor apps (app data can be in environment)
- provides workaround for AWS Relational Database Service (RDS) not
allowing `ALTER DATABASE SET 'app.[KEY]' TO '[VALUE]'` on database.
2018-02-19 12:41:22 -06:00
steve-chavez
188f947437
Maintain backward compatibility on GUC headers feature
...
If pg version >= 9.6 is detected the feature is enabled,
also all of the 9.6 dependent tests are moved to their own spec.
2017-10-18 17:41:55 -05:00
Elliot Murphy and Joe Nelson
3ccae4bb8b
Allow configurable audience claim ( #975 )
2017-09-26 07:29:20 -07:00
Steve Chávez and Joe Nelson
4ba27d84a4
Fix some OpenAPI issues ( #970 )
...
* Fix #933 , update externals docs url to current version
* Fix #962 , openApi don't err on nonexistent schema
* Fix #954 , make OpenAPI rpc output dependent on user privileges
2017-09-25 23:09:52 -07:00
Steve Chávez and Joe Nelson
cf19ad0369
Allow GET on RPC ( #946 )
2017-09-17 11:16:46 -05:00
Joe Nelson and GitHub
0ed4215a0d
Support asymmetric JWK ( #919 )
2017-08-09 08:42:00 -05:00
SteveBash and Joe Nelson
b8eb2cd9c1
Add and/or params for complex boolean logic
...
* Add support for and/or params in GET, POST, PATCH and DELETE
* Restrict usage of IN in and/or to be inside parens e.g. in.(1,2,3)
* Allow quoting operators for values that have ',)' chars
inside and/or e.g. eq."(entity,1)"
2017-05-13 16:49:25 -05:00
Steve Chávez and Joe Nelson
3e26c1a83f
Add connection retrying on startup and SIGHUP, Fix #742 ( #869 )
...
* Add connection retrying on startup and SIGHUP, Fix #742
* Ensure that only one connection worker can run at a time
* Change ConnectionError status code to 503 and add automatic connection retrying
2017-05-06 19:11:18 -05:00
Joe Nelson and GitHub
104a7ed4fa
Use a mime type to request singular JSON responses ( #763 )
2017-01-16 15:11:37 -08:00
Ruslan Talpa and Joe Nelson
16fd3a57ff
Fix #746 ( #769 )
...
also fix broken text env
After the last couple of commits the tests ran correctly only on a
fresh db, in addition, the roles within the db were not created/dropped
on each request and we need that since their privileges differ and we
need to to have an absolute clean db on each execution
2016-12-18 15:46:53 -08:00
Trevor Basinger and Joe Nelson
e364cbc3ff
Support binary (b64) JWT secrets ( #772 )
2016-12-11 09:01:03 -08:00
dsimunic and Joe Nelson
0d85152e42
Improve test db management ( #747 )
2016-12-01 21:06:10 -08:00
Joe Nelson and GitHub
74e68408e6
Bring packages up to date ( #722 )
...
* Bring packages up to date
* New LTS includes deps now
Use stack to select most versions
* Alphabetize packages
* Strip down packages
Switch tests to protolude
* Appease cabal check with base version constraint
2016-10-19 22:25:58 -07:00
Joe Nelson
9cd65a4033
Avoid calling getPOSIXTime more than necessary
2016-10-03 09:55:28 -07:00
Joe Nelson
62ed9e2c4d
Do not require jwt secret, but die on auth without it
2016-09-24 21:28:08 -07:00
Jacky Hu
1fef1991ef
Add proxy awareness for OpenAPI spec generation
...
Proxy uri from command line options takes precedence over host and port
2016-07-07 19:20:40 +08:00
Joe Nelson
88aad4b1b6
Reload schema definition on SIGHUP ( #570 )
2016-04-26 07:50:23 -07:00
Joe Nelson
31738d745f
Regression test for read/write unicode table names
2016-03-25 15:14:00 -07:00
Joe Nelson
e315ad99b4
Name the main module "Main" as required
2016-02-29 14:50:44 -08:00
Joe Nelson
de772b9246
Modified the concurrent test to illustrate problem with prepared statement
2016-02-22 20:58:44 -08:00
Joe Nelson
c28b26d949
Run QueryLimitedSpec with its own server flags
2016-02-22 19:21:39 -08:00
Joe Nelson
b0974a4e36
Reset db between each test suite
2016-02-22 17:50:00 -08:00
Joe Nelson
17acd134c7
Suppress server logging in test mode
2016-02-22 17:48:33 -08:00
Joe Nelson
d5c1438c6e
Use hasql-transaction
...
Also use hspec before-wrapper
2016-02-21 18:05:25 -08:00
Joe Nelson
d7fe59f0b0
WIP: share server code between tests and program
...
- Share server code in Main
- Switch to hasql-pool
- Use pool in tests
- DRY up test runner
2016-02-21 12:22:18 -08:00
Joe Nelson
52e689b830
Add concurrent test for "transaction in progress"
...
MonadBaseControl wizardry courtesy of @jwiegley
2016-02-20 17:45:55 -08:00
Joe Nelson
ac73e8d77b
Remove connection pooling in test
2016-01-24 18:09:19 -08:00
Joe Nelson
b9fd083c77
It all compiles but all requests give a postgres error
2016-01-24 18:09:19 -08:00
Joe Nelson
fec316b087
WIP: fixing compiler errors in specs
2016-01-24 18:09:19 -08:00
Ruslan Talpa
3cd01f9859
Fix failing test after test structure optimization
2015-12-11 10:23:11 +02:00
Joe Nelson
b3144aee15
Cache schema structure between tests for speed
...
Causes one test to fail
2015-12-10 13:36:28 -08:00
Diogo Biazus
0961524e70
Refactors tests to use new fixtures and remove some haskell functions that wont be necessary anymore
2015-12-08 00:44:49 -05:00
Joe Nelson
e37d5d9b25
Style tweak
2015-02-15 15:59:49 -08:00
Adam C. Baker
c9b960f955
only create schema once
2014-12-29 17:57:31 -08:00
Joe Nelson
5900475460
Reset db between tests rather than using transactions to accomodate Hasql limitation
2014-12-06 17:42:21 -08:00
Joe Nelson
f1ecbec543
Do not quote params in Location header
...
Also treat the enum field in OPTIONS as an array uniformly
2014-12-06 17:42:21 -08:00
Joe Nelson
dc43bcbca9
Silence the database fixture output from stdout
2014-12-06 17:42:21 -08:00