Allow config file reloading with SIGUSR2
* move config validation to Config.hs * Add tests for jwt-secret/app.settings.*/db-schema reload
This commit is contained in:
committed by
Steve Chavez
parent
e272ea47be
commit
e8b4e3771c
+5
-2
@@ -65,12 +65,15 @@ main = do
|
||||
|
||||
let
|
||||
-- For tests that run with the same refDbStructure
|
||||
app cfg = return ((), postgrest LogQuiet (cfg testDbConn) refDbStructure pool getTime $ pure ())
|
||||
app cfg = do
|
||||
refConf <- newIORef $ cfg testDbConn
|
||||
return ((), postgrest LogQuiet refConf refDbStructure pool getTime $ pure ())
|
||||
|
||||
-- For tests that run with a different DbStructure(depends on configSchemas)
|
||||
appDbs cfg = do
|
||||
dbs <- (newIORef . Just) =<< setupDbStructure pool (configSchemas $ cfg testDbConn) actualPgVersion
|
||||
return ((), postgrest LogQuiet (cfg testDbConn) dbs pool getTime $ pure ())
|
||||
refConf <- newIORef $ cfg testDbConn
|
||||
return ((), postgrest LogQuiet refConf dbs pool getTime $ pure ())
|
||||
|
||||
let withApp = app testCfg
|
||||
maxRowsApp = app testMaxRowsCfg
|
||||
|
||||
Reference in New Issue
Block a user