Wolfgang Walther and Wolfgang Walther
2fe2c9104b
ci: Fix weeder not stopping CI on error
...
Removes dead code that was unnoticed
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-28 17:12:32 +01:00
Steve Chavez and GitHub
c7cadcd776
Fix embedded filter silently getting ignored ( #2133 )
...
When the embedded resource is not included in the request
2022-01-24 17:52:27 -05:00
Wolfgang Walther and Wolfgang Walther
fae1e168a7
Fix memory tests timing out after c3ade07
2022-01-24 14:56:06 +01:00
Wolfgang Walther
d9e016be8b
feat: Allow running postgrest without configuration
...
Resolves #1823
2022-01-22 15:59:26 +01:00
Wolfgang Walther
c3ade07ad6
feat: Make db-anon-role optional
...
Without db-anon-role, PostgREST will block any anonymous access without hitting the database.
Resolves #1689 , Ref #1823
2022-01-22 15:59:26 +01:00
Wolfgang Walther
05b5ecd23b
Reformatting of some test-cases and removal of superfluous comments.
2022-01-22 15:13:21 +01:00
Wolfgang Walther
dbbde6aae1
feat: Make db-schemas optional
...
Resolves #1769 , Ref #1823
2022-01-22 15:13:21 +01:00
Wolfgang Walther
9ed30c0ba4
feat: Make db-uri optional
...
The default is now "postgresql://" which falls back to LIBPQ environment variables.
Resolves #1991 , Ref #1823
2022-01-22 15:13:19 +01:00
Wolfgang Walther
ec09b87940
test: Make io tests use environment variables instead of config files where possible.
...
Load jwt secret from file instead of stdin in tests, because stdin is not supported when reloading the config. Resolves #2126 .
2022-01-22 15:10:25 +01:00
Wolfgang Walther and Wolfgang Walther
995215c6a5
fix: Read database configuration properly when = is present in value
...
Resolves #2120
2022-01-10 09:24:49 +01:00
Wolfgang Walther and Wolfgang Walther
9639cd5751
feat: Add current user to apache-style request logging.
2022-01-07 20:26:33 +01:00
3c17f97c87
refactor: Make JWT authorization a middleware
...
This follows the style of wai-middleware-auth package and
makes the JWT parsing a middleware.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de >
2022-01-07 20:26:33 +01:00
Steve Chavez and GitHub
65f27653dc
cov: empty coverage overlay ( #2119 )
...
The overlay depended on the version number, which caused errors when upgrading.
Also update cabal description.
2022-01-07 13:06:03 -05:00
Wolfgang Walther and Wolfgang Walther
8b63d928ae
test: Reorganize test/ folder into one subdirectory for each test type
2022-01-07 13:10:36 +01:00
Wolfgang Walther and Wolfgang Walther
df5d9400fe
test: Make io tests use admin/ready to wait for startup
2022-01-07 12:07:09 +01:00
monacoremo and Wolfgang Walther
bfbec8fa36
refactor: Carve out QueryParams module
2022-01-07 09:32:33 +01:00
steve-chavez and Wolfgang Walther
51ee072f84
fix: clarify error for failed schema cache load
2022-01-07 09:31:30 +01:00
steve-chavez and Wolfgang Walther
aa82d2e277
Consider schema cache state on the ready check
...
* empty schema cache when it fails loading so the ready check can pick
its new state
2022-01-07 09:31:30 +01:00
Wolfgang Walther and Wolfgang Walther
e13d912a79
cov: Add coverage overlay for impossible case in corsPolicy
2022-01-05 11:01:54 +01:00
Wolfgang Walther and Wolfgang Walther
826ae7459a
refactor: simplify logger middleware
2022-01-05 11:01:54 +01:00
Wolfgang Walther and Wolfgang Walther
b0a0c4768d
cov: Add tests for request logging
2022-01-05 11:01:54 +01:00
steve-chavez
4a9ca9bdae
Add live endpoint to admin server
...
* refactor io tests
* add network package to windows
2022-01-04 20:12:52 -05:00
steve-chavez
65a3ae08f0
Change admin health endpoint to ready
2022-01-04 20:12:52 -05:00
steve-chavez
bba6e96fd3
Connect to main app socket on health check
2022-01-04 20:12:52 -05:00
Wolfgang Walther and Wolfgang Walther
cc900787de
test: Remove unused unix-socket.config file
...
Unix sockets are the default in io tests and we are testing ip connections explicitly.
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
01e65f5221
test: Improve io test perfomance
...
Local test improves performance by 15%.
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
1e9031573c
test: Move io-tests SQL fixtures to a separate file
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
81ebdff977
test: Improve log output for failing io-tests
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
9baad293e8
test: Refactor invalid_role_claim_key_notify_reload test to properly read all available input
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
efc7a21427
test: Refactor test-cases for admin/health endpoint
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
b9c497a3ab
test: Use .encode() end .decode default values in io-tests
...
Those default to "utf-8" anyway.
2022-01-04 09:36:22 +01:00
Wolfgang Walther and Wolfgang Walther
4f7ee6f36a
cov: Improve jwt claims test-cases
2021-12-25 13:27:53 +01:00
Wolfgang Walther and Wolfgang Walther
14f3b25022
fix: Fix wrong CORS header Authentication -> Authorization
...
Also refactors defaultCorsPolicy and corsPolicy and cleans up CORS tests
2021-12-25 13:27:53 +01:00
Wolfgang Walther and Wolfgang Walther
b99c8c897c
fix: Make recursive view parsing work with XMLTABLE + DEFAULT
2021-12-24 19:01:20 +01:00
Steve Chavez and GitHub
ac3655df1d
feat: minimal health check ( #2092 )
2021-12-23 08:00:10 -05:00
Laurence Isla and GitHub
c858d158aa
Add hint to verify table and foreign key existence on a relationship error
2021-12-20 12:11:07 -05:00
Steve Chavez and GitHub
c86e254a24
fix: is not working with upper/mixed case values ( #2081 )
2021-12-14 19:13:38 -05:00
Wolfgang Walther and Wolfgang Walther
031de4d35e
fix: Dump db-config option without quotes as it's a boolean
2021-12-11 08:12:59 +01:00
Wolfgang Walther and Remo
74f6e5225c
nix: Add weeder to postgrest-coverage
...
Removes a bit of dead code from SpecHelper.hs
2021-12-04 11:39:56 +01:00
Wolfgang Walther and Wolfgang Walther
0e20b47875
fix: Return 204 No Content without Content-Type for PUT
2021-12-01 09:19:47 +01:00
Wolfgang Walther and Wolfgang Walther
1cb00d3c62
fix: Execute deferred constraint triggers when using Prefer: tx=rollback
...
Resolves #2020
2021-11-30 15:54:12 +01:00
Wolfgang Walther and Wolfgang Walther
32ff9dfb48
nix(feat): Add postgrest-loadtest
2021-11-27 10:57:29 +01:00
steve-chavez
132ecd8d74
Correct count query when doing inner joins
2021-11-26 10:39:19 -05:00
4fb0d1279c
test: Add test to confirm ASSERT will return 500 Internal Server Error
...
Co-authored-by: Dmitry Wagin <dmitry.wagin@ya.ru >
2021-11-25 22:56:49 +01:00
Wolfgang Walther and Wolfgang Walther
a65ac9b0f6
feat: drop support for pg 9.5
2021-11-24 19:42:53 +01:00
Wolfgang Walther and Wolfgang Walther
7ed8b10776
test: Remove conditional for pgVersion95 in JsonOperatorSpec
...
pgVersion95 is the minimum already.
2021-11-24 19:42:53 +01:00
Wolfgang Walther and Remo
b7dcc63e37
nix: Simplify with_tmp_db
2021-11-24 18:06:56 +01:00
Laurence Isla and GitHub
62243852b6
feat: Improve error message for ambiguous embedding
...
- Adds a relevant hint that includes unambiguous embedding suggestions.
- Joins origin and target into one single embedding key
2021-11-23 22:23:29 -05:00
steve-chavez
1b48531369
remove the db-embed-default-join config
2021-11-23 12:32:51 -05:00
Laurence Isla and GitHub
4e07846c5d
fix: Add tests for embedding on overloaded functions with a default param
...
Resolves #1672
Was actually fixed in #1841 / 67c2ed7 , this just adds the tests to confirm it.
2021-11-19 09:00:16 +01:00