-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Any chance we get more detailed errors?
I've been getting the following crash when I try to run a test with tmp-postgres.
uncaught exception: StartError
StartPostgresFailed (ExitFailure 1)
The error doesn't give me any information about what I'm doing wrong, so I have no idea how to proceed other than trying different random things in my hspec withSetup implmentation.
A have a withSetup configured as follows:
withSetup :: (Pool Connection -> IO ()) -> IO ()
withSetup f = do
-- Helper to throw exceptions
let throwE x = either throwIO pure =<< x
throwE $ withDbCache $ \dbCache -> withConfig (cacheConfig dbCache) $ \db -> do
conn <- liftIO $ connectPostgreSQL (TmpPostgres.toConnectionString db)
initializationRes <- Migrations.runMigration conn Migrations.defaultOptions MigrationInitialization
x <- withSnapshot db $ \snapshot -> do
withConfig (snapshotConfig snapshot) $ \migratedDb -> f =<< createPool (connectPostgreSQL $ toConnectionString migratedDb) close 2 60 10
pTraceShowM x
pass
```Metadata
Metadata
Assignees
Labels
No labels