diff options
-rw-r--r-- | src/Squeal/PostgreSQL/Hspec.hs | 7 | ||||
-rw-r--r-- | stack.yaml | 8 |
2 files changed, 5 insertions, 10 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 |
@@ -18,7 +18,7 @@ | |||
18 | # | 18 | # |
19 | # resolver: ./custom-snapshot.yaml | 19 | # resolver: ./custom-snapshot.yaml |
20 | # resolver: https://example.com/snapshots/2018-01-01.yaml | 20 | # resolver: https://example.com/snapshots/2018-01-01.yaml |
21 | resolver: lts-13.20 | 21 | resolver: lts-16.31 |
22 | 22 | ||
23 | # User packages to be built. | 23 | # User packages to be built. |
24 | # Various formats can be used as shown in the example below. | 24 | # Various formats can be used as shown in the example below. |
@@ -41,13 +41,9 @@ packages: | |||
41 | # (e.g., acme-missiles-0.3) | 41 | # (e.g., acme-missiles-0.3) |
42 | extra-deps: | 42 | extra-deps: |
43 | - git: https://github.com/morphismtech/squeal | 43 | - git: https://github.com/morphismtech/squeal |
44 | commit: 9b5c1f78097f531a66da8cca267e2ad6c1d227e6 | 44 | commit: 7557c2ddd32430ed82937a7864e5879b1ac77513 |
45 | subdirs: | 45 | subdirs: |
46 | - squeal-postgresql | 46 | - squeal-postgresql |
47 | - unliftio-pool-0.2.1.0@sha256:4de658feb1b10051c5af024c20cd7baa369c777716c54a7b3e2888a73286aecf | ||
48 | - free-categories-0.2.0.0 | ||
49 | - records-sop-0.1.0.2 | ||
50 | - tmp-postgres-0.1.1.0 | ||
51 | 47 | ||
52 | # Override default flag values for local packages and extra-deps | 48 | # Override default flag values for local packages and extra-deps |
53 | # flags: {} | 49 | # flags: {} |