diff options
author | Adrien Duclos <adrien.duclos@fretlink.com> | 2021-01-22 13:04:50 +0100 |
---|---|---|
committer | Adrien Duclos <adrien.duclos@fretlink.com> | 2021-01-22 13:04:50 +0100 |
commit | cfe36707d9d022c2959940566cc03353ea7e3238 (patch) | |
tree | 3f228e9579247924071360ffc73b2f1a04e21045 /src/Squeal | |
parent | 4b30aff3e18ae6ebdc2a3552832265c55ca88d43 (diff) | |
download | squeal-hspec-cfe36707d9d022c2959940566cc03353ea7e3238.tar.gz squeal-hspec-cfe36707d9d022c2959940566cc03353ea7e3238.tar.zst squeal-hspec-cfe36707d9d022c2959940566cc03353ea7e3238.zip |
Bump the LTS to 16.31
Diffstat (limited to 'src/Squeal')
-rw-r--r-- | src/Squeal/PostgreSQL/Hspec.hs | 7 |
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 | |||
24 | import Control.Monad.Base (liftBase) | 24 | import Control.Monad.Base (liftBase) |
25 | import Data.ByteString (ByteString) | 25 | import Data.ByteString (ByteString) |
26 | import qualified Data.ByteString.Char8 as BSC | 26 | import qualified Data.ByteString.Char8 as BSC |
27 | import qualified Database.Postgres.Temp as Temp | 27 | import Database.Postgres.Temp as Temp |
28 | import Generics.SOP (K) | ||
29 | import Squeal.PostgreSQL | 28 | import Squeal.PostgreSQL |
30 | import System.Environment (lookupEnv) | 29 | import System.Environment (lookupEnv) |
31 | import Test.Hspec | 30 | import Test.Hspec |
@@ -53,8 +52,8 @@ getOrCreateConnectionString = do | |||
53 | 52 | ||
54 | createTempDB :: IO (ByteString, Maybe Temp.DB) | 53 | createTempDB :: IO (ByteString, Maybe Temp.DB) |
55 | createTempDB = do | 54 | createTempDB = 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 |