Add test suite for redis backend.
Currently failing pretty badly. :(
This commit is contained in:
parent
83faccf3f9
commit
7fdfd16216
@ -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
|
||||
|
||||
14
serversession-backend-redis/tests/Main.hs
Normal file
14
serversession-backend-redis/tests/Main.hs
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user