feat: implement server-timing-enabled config parameter (#3064)

This commit is contained in:
Andrei Dziahel
2023-11-22 17:57:50 -05:00
committed by GitHub
parent abcb21c69a
commit c3301a1653
18 changed files with 26 additions and 8 deletions
+4 -4
View File
@@ -1120,7 +1120,7 @@ def test_server_timing_jwt_should_decrease_on_subsequent_requests(defaultenv):
env = {
**defaultenv,
"PGRST_DB_PLAN_ENABLED": "true",
"PGRST_SERVER_TIMING_ENABLED": "true",
"PGRST_JWT_CACHE_MAX_LIFETIME": "86400",
"PGRST_JWT_SECRET": "@/dev/stdin",
"PGRST_DB_CONFIG": "false",
@@ -1158,7 +1158,7 @@ def test_jwt_caching_works_with_db_plan_disabled(defaultenv):
env = {
**defaultenv,
"PGRST_DB_PLAN_ENABLED": "false",
"PGRST_SERVER_TIMING_ENABLED": "true",
"PGRST_JWT_CACHE_MAX_LIFETIME": "86400",
"PGRST_JWT_SECRET": "@/dev/stdin",
"PGRST_DB_CONFIG": "false",
@@ -1180,7 +1180,7 @@ def test_server_timing_jwt_should_not_decrease_when_caching_disabled(defaultenv)
env = {
**defaultenv,
"PGRST_DB_PLAN_ENABLED": "true",
"PGRST_SERVER_TIMING_ENABLED": "true",
"PGRST_JWT_CACHE_MAX_LIFETIME": "0", # cache disabled
"PGRST_JWT_SECRET": "@/dev/stdin",
"PGRST_DB_CONFIG": "false",
@@ -1210,7 +1210,7 @@ def test_jwt_cache_with_no_exp_claim(defaultenv):
env = {
**defaultenv,
"PGRST_DB_PLAN_ENABLED": "true",
"PGRST_SERVER_TIMING_ENABLED": "true",
"PGRST_JWT_CACHE_MAX_LIFETIME": "86400",
"PGRST_JWT_SECRET": "@/dev/stdin",
"PGRST_DB_CONFIG": "false",