tmp-proc-redis 0.6.0.1 → 0.7.0.0
raw patch · 4 files changed
+29/−16 lines, 4 filesdep ~tmp-procPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: tmp-proc
API changes (from Hackage documentation)
- System.TmpProc.Docker.Redis: ProcHandle :: !a -> !String -> !SvcURI -> !HostIpAddress -> ProcHandle a
- System.TmpProc.Docker.Redis: [hAddr] :: ProcHandle a -> !HostIpAddress
- System.TmpProc.Docker.Redis: [hPid] :: ProcHandle a -> !String
- System.TmpProc.Docker.Redis: [hProc] :: ProcHandle a -> !a
- System.TmpProc.Docker.Redis: [hUri] :: ProcHandle a -> !SvcURI
+ System.TmpProc.Docker.Redis: pattern ProcHandle :: a -> String -> SvcURI -> HostIpAddress -> ProcHandle a
Files
- ChangeLog.md +4/−0
- src/System/TmpProc/Docker/Redis.hs +1/−1
- test/Test/TmpProc/Docker/RedisSpec.hs +21/−7
- tmp-proc-redis.cabal +3/−8
ChangeLog.md view
@@ -2,6 +2,10 @@ `tmp-proc-redis` uses [PVP Versioning][1]. +## 0.7.0.0 -- 2024-05-12++* Extend the upper bound for tmp-proc to allow 0.7+ ## 0.6.0.1 -- 2024-02-28 * Extend the version bounds of bytestring to allow 0.12.1
src/System/TmpProc/Docker/Redis.hs view
@@ -117,7 +117,7 @@ clearKeys :: ProcHandle TmpRedis -> IO ()-clearKeys handle@(ProcHandle {hProc}) =+clearKeys handle@ProcHandle {hProc} = let go (TmpRedis []) = pure () go (TmpRedis keys) = withTmpConn handle $ \c -> runRedis c $ void $ del keys in go hProc
test/Test/TmpProc/Docker/RedisSpec.hs view
@@ -11,9 +11,23 @@ import Data.Proxy (Proxy (..)) import qualified Data.Text as Text import Database.Redis (exists, runRedis, setex)-import System.TmpProc.Docker.Redis+import System.TmpProc.Docker+ ( HList+ , HandlesOf+ , Pinged (..)+ , ProcHandle+ , handleOf+ , ixPing+ , ixReset+ , nameOf+ , only+ , startupAll+ , terminateAll+ , withTmpConn+ )+import System.TmpProc.Docker.Redis (TmpRedis (..)) import Test.Hspec-import Test.Hspec.TmpProc+import Test.Hspec.TmpProc (tdescribe) spec :: Spec@@ -41,14 +55,14 @@ theProc = only $ TmpRedis [testKey] -setupHandles :: IO (HList '[ProcHandle TmpRedis])+setupHandles :: IO (HandlesOf '[TmpRedis]) setupHandles = do- hs <- startupAll theProc- initRedis hs `onException` terminateAll hs- pure hs+ hs' <- startupAll theProc+ initRedis hs' `onException` terminateAll hs'+ pure hs' -initRedis :: HList '[ProcHandle TmpRedis] -> IO ()+initRedis :: HandlesOf '[TmpRedis] -> IO () initRedis = addTestKeyValue . handleOf @"a-redis-db" Proxy
tmp-proc-redis.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: tmp-proc-redis-version: 0.6.0.1+version: 0.7.0.0 synopsis: Launch Redis in docker using tmp-proc description: Demos how to use tmp-proc to run Redis in docker in a unittest.@@ -16,12 +16,7 @@ extra-source-files: ChangeLog.md README.md-tested-with:- GHC == 8.8.4- GHC == 8.10.7- GHC == 9.0.2- GHC == 9.2.8- GHC == 9.4.5+tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.5 source-repository head type: git@@ -36,7 +31,7 @@ , bytestring >=0.10.8.2 && <0.12.2 , hedis >=0.10.4 && <0.16 , text >=1.2.3 && <2.2- , tmp-proc >=0.5.3 && <0.7+ , tmp-proc >=0.5.3 && <0.8 default-language: Haskell2010 ghc-options: -fno-ignore-asserts -Wall