aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Squeal
diff options
context:
space:
mode:
Diffstat (limited to 'src/Squeal')
-rw-r--r--src/Squeal/PostgreSQL/Hspec.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Squeal/PostgreSQL/Hspec.hs b/src/Squeal/PostgreSQL/Hspec.hs
index 32ab189..7e78fa7 100644
--- a/src/Squeal/PostgreSQL/Hspec.hs
+++ b/src/Squeal/PostgreSQL/Hspec.hs
@@ -24,8 +24,7 @@ import Control.Monad
24import Control.Monad.Base (liftBase) 24import Control.Monad.Base (liftBase)
25import Data.ByteString (ByteString) 25import Data.ByteString (ByteString)
26import qualified Data.ByteString.Char8 as BSC 26import qualified Data.ByteString.Char8 as BSC
27import qualified Database.Postgres.Temp as Temp 27import Database.Postgres.Temp as Temp
28import Generics.SOP (K)
29import Squeal.PostgreSQL 28import Squeal.PostgreSQL
30import System.Environment (lookupEnv) 29import System.Environment (lookupEnv)
31import Test.Hspec 30import Test.Hspec
@@ -53,8 +52,8 @@ getOrCreateConnectionString = do
53 52
54createTempDB :: IO (ByteString, Maybe Temp.DB) 53createTempDB :: IO (ByteString, Maybe Temp.DB)
55createTempDB = do 54createTempDB = do
56 tempDB <- either throwIO return =<< Temp.startAndLogToTmp [] 55 tempDB <- either throwIO return =<< Temp.start
57 let connectionString = BSC.pack (Temp.connectionString tempDB) 56 let connectionString = Temp.toConnectionString tempDB
58 pure (connectionString, Just tempDB) 57 pure (connectionString, Just tempDB)
59 58
60-- | Start a temporary @postgres@ process and create a pool of connections to it 59-- | Start a temporary @postgres@ process and create a pool of connections to it