steve-chavez
f033c2c4b5
Add role-claim-key config value
2018-04-30 11:31:06 -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
Pi3r and Joe Nelson
2b5ae34c5a
Update jose to 0.6 ( #997 )
2017-10-15 10:49:25 -04: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
Joe Nelson and GitHub
0ed4215a0d
Support asymmetric JWK ( #919 )
2017-08-09 08:42:00 -05:00
Joe Nelson and GitHub
50de0536de
Allow csv formatting in rpc output ( #882 )
2017-05-27 00:07:23 -05:00
Diogo Biazus and Joe Nelson
728e40c96c
Update hspec-wai to 0.8.0 ( #799 )
2017-02-14 21:18:01 -08: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
5a166e8e80
Fix custom pre-request handler
...
Uses Ruslan's technique
2016-09-27 23:17:08 -07:00
Joe Nelson
06363ccc77
WIP: add argument for custom pre-request handler
2016-09-27 00:19:05 -07:00
Joe Nelson
12a8c682bd
Use sql to generate jwt, rather than custom haskell
2016-09-24 21:32:47 -07:00
Joe Nelson
62ed9e2c4d
Do not require jwt secret, but die on auth without it
2016-09-24 21:28:08 -07:00
Joe Nelson
449480bf01
Require JWT secret, remove default, optionally read from file
...
Fixes #474 , fixes #495 when file is used
2016-09-24 21:28:08 -07:00
Joe Nelson and GitHub
af75988dd4
No count by default ( #700 )
...
* WIP: disable counting total table size by default
* Remove commented tests since PUT is no longer supported
* Fix tests for invalid range which require count
* Do not report count in PATCH response if not asked
* Return count of deleted items only if asked
* Return count for bulk insert when requested
* Changelog entry
2016-09-04 10:31:24 -07:00
Diogo Biazus and Joe Nelson
6f737056a2
Protolude completion in library and executable ( #697 )
2016-08-21 15:10:19 -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
Jacky Hu
4b0c5cb36f
Disable schema test
2016-06-18 10:18:43 +08:00
Ruslan Talpa
7c83edc402
Limit embeded items
2016-05-26 09:56:28 +03:00
Joe Nelson
31738d745f
Regression test for read/write unicode table names
2016-03-25 15:14:00 -07:00
Joe Nelson
c28b26d949
Run QueryLimitedSpec with its own server flags
2016-02-22 19:21:39 -08:00
Joe Nelson
17acd134c7
Suppress server logging in test mode
2016-02-22 17:48:33 -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
f65557573c
Match new config param order in tests
2016-02-05 09:39:43 -08:00
Joe Nelson
e02dc2e92e
Remove redundant do
2016-01-27 18:51:53 -08:00
Joe Nelson
f634b7fe98
Rollback test connection on errors
2016-01-24 18:09:20 -08:00
Joe Nelson
bbf8365cd2
Upgrade hasql
2016-01-24 18:09:20 -08:00
Joe Nelson
51f71eb53d
Run queries in a transaction again
2016-01-24 18:09:19 -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
4cc0189ac9
Prefixes all roles used in test suite with postgrest_test
2015-12-08 12:03:46 -05:00
Diogo Biazus
8b4cb4be6e
Replaces postgrest_authenticator for postgrest_test_authenticator
2015-12-08 11:53:18 -05:00
Diogo Biazus
6cc8ca707f
Separates privileges in another fixture
2015-12-08 11:33:22 -05:00
Diogo Biazus
f66f9e7c92
Adds -d postgrest to setup database step in SpecHelper
2015-12-08 11:06:50 -05:00
Diogo Biazus
ca3ab7babf
Cleanup code in SpecHelper
2015-12-08 01:01:38 -05: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
f4c73c7666
Test for --max-rows behavior
2015-12-05 19:31:53 -08:00
Joe Nelson
cbbb1871bb
Add --max-rows option (no automated tests yet)
...
Fixes #288
2015-12-05 19:03:18 -08:00
calebmer
b651a45734
Fix time fetch on initialization
2015-11-28 16:49:12 -05:00
Joe Nelson
f3d5759c1a
JWT is handled by middleware, do not need it in Intent
2015-11-19 11:20:30 -08:00
calebmer
ad555986d4
Error refactors
2015-11-16 17:28:39 -05:00
Joe Nelson
a6cfecbc29
Merge v3
2015-11-14 17:52:05 -08:00
calebmer
b8b073810f
Rename functions
2015-11-11 15:53:52 -05:00