appendful-persistent 0.0.0.0 → 0.1.0.0
raw patch · 5 files changed
+19/−17 lines, 5 filesdep +genvalidity-sydtestdep +sydtestdep −genvalidity-hspecdep −hspec
Dependencies added: genvalidity-sydtest, sydtest
Dependencies removed: genvalidity-hspec, hspec
Files
- appendful-persistent.cabal +6/−4
- test/Data/Appendful/Persistent/SingleClientSpec.hs +4/−5
- test/Data/Appendful/Persistent/TwoClientsSpec.hs +6/−5
- test/Spec.hs +1/−1
- test/TestUtils.hs +2/−2
appendful-persistent.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.7.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack name: appendful-persistent-version: 0.0.0.0+version: 0.1.0.0 description: Persistent integration for ppend-only cooperative agreement homepage: https://github.com/NorfairKing/appendful#readme bug-reports: https://github.com/NorfairKing/appendful/issues@@ -48,6 +48,8 @@ hs-source-dirs: test ghc-options: -threaded -rtsopts -with-rtsopts=-N+ build-tool-depends:+ sydtest-discover:sydtest-discover build-depends: QuickCheck , appendful@@ -56,9 +58,8 @@ , containers , genvalidity , genvalidity-appendful- , genvalidity-hspec , genvalidity-persistent- , hspec+ , genvalidity-sydtest , monad-logger , mtl , path@@ -66,6 +67,7 @@ , persistent , persistent-sqlite , persistent-template+ , sydtest , text , validity default-language: Haskell2010
test/Data/Appendful/Persistent/SingleClientSpec.hs view
@@ -15,16 +15,15 @@ import Data.List import qualified Data.Map as M import Database.Persist.Sql-import Test.Hspec-import Test.Hspec.QuickCheck import Test.QuickCheck-import Test.Validity+import Test.Syd hiding (runTest)+import Test.Syd.Validity import TestUtils {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-} spec :: Spec-spec = modifyMaxShrinks (const 0) $+spec = oneClientSpec $ do describe "sanity" $ do describe "setupClient & clientGetStore" $ do@@ -156,7 +155,7 @@ } oneClientSpec :: SpecWith TestEnv -> Spec-oneClientSpec = around withTestEnv+oneClientSpec = modifyMaxSuccess (`div` 10) . around withTestEnv withTestEnv :: (TestEnv -> IO a) -> IO a withTestEnv func =
test/Data/Appendful/Persistent/TwoClientsSpec.hs view
@@ -13,15 +13,14 @@ import Data.GenValidity.Appendful () import qualified Data.Map as M import Database.Persist.Sql-import Test.Hspec-import Test.Hspec.QuickCheck-import Test.Validity+import Test.Syd hiding (runTest)+import Test.Syd.Validity import TestUtils {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-} spec :: Spec-spec = modifyMaxShrinks (const 0) $+spec = twoClientsSpec $ do describe "sanity" $ do describe "setupClient & clientGetStore" $ do@@ -205,7 +204,9 @@ } twoClientsSpec :: SpecWith TestEnv -> Spec-twoClientsSpec = around withTestEnv+twoClientsSpec =+ modifyMaxSuccess (`div` 10)+ . around withTestEnv withTestEnv :: (TestEnv -> IO a) -> IO a withTestEnv func =
test/Spec.hs view
@@ -1,1 +1,1 @@-{-# OPTIONS_GHC -F -pgmF hspec-discover #-}+{-# OPTIONS_GHC -F -pgmF sydtest-discover #-}
test/TestUtils.hs view
@@ -27,12 +27,12 @@ withServerPool func = runNoLoggingT $ withSqlitePool ":memory:" 1 $ \serverPool -> do- flip runSqlPool serverPool $ void $ runMigrationSilent migrateServer+ flip runSqlPool serverPool $ void $ runMigrationQuiet migrateServer liftIO $ func serverPool withClientPool :: (ConnectionPool -> IO a) -> IO a withClientPool func = runNoLoggingT $ withSqlitePool ":memory:" 1 $ \clientPool -> do- flip runSqlPool clientPool $ void $ runMigrationSilent migrateClient+ flip runSqlPool clientPool $ void $ runMigrationQuiet migrateClient liftIO $ func clientPool