Add test suite for redis backend.

Currently failing pretty badly. :(
This commit is contained in:
Felipe Lessa 2015-05-28 02:17:36 -03:00
parent 83faccf3f9
commit 7fdfd16216
2 changed files with 30 additions and 0 deletions

View File

@ -36,6 +36,22 @@ library
TypeFamilies
ghc-options: -Wall
test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
build-depends:
base, bytestring, containers, hedis, path-pieces, text,
time, transformers
, hspec >= 2.1 && < 3
, serversession
, serversession-backend-redis
main-is: Main.hs
ghc-options: -Wall -threaded -with-rtsopts=-N
source-repository head
type: git
location: https://github.com/yesodweb/serversession

View File

@ -0,0 +1,14 @@
module Main (main) where
import Database.Redis (connect, defaultConnectInfo)
import Test.Hspec
import Web.ServerSession.Backend.Redis
import Web.ServerSession.Core.StorageTests
import qualified Control.Exception as E
main :: IO ()
main = do
conn <- connect defaultConnectInfo
hspec $ describe "AcidStorage on memory only" $ parallel $
allStorageTests (RedisStorage conn) it runIO shouldBe shouldReturn shouldThrow