test: enusre arc roundtrips
This commit is contained in:
parent
5794ca384c
commit
ef7a743c60
@ -42,11 +42,12 @@ spec = withApp . describe "File handling" $ do
|
||||
|
||||
suppliedContent <- runConduit $ transPipe generalize fileContentContent
|
||||
.| C.sinkLazy
|
||||
readContent <- runConduit $ sourceFileMinio fileReferenceContentContent
|
||||
.| C.takeE (succ $ olength suppliedContent)
|
||||
.| C.sinkLazy
|
||||
for_ [1..10] $ \_i -> do
|
||||
readContent <- runConduit $ sourceFileMinio fileReferenceContentContent
|
||||
.| C.takeE (succ $ olength suppliedContent)
|
||||
.| C.sinkLazy
|
||||
|
||||
liftIO $ readContent `shouldBe` suppliedContent
|
||||
liftIO $ readContent `shouldBe` suppliedContent
|
||||
describe "DB" $ do
|
||||
modifyMaxSuccess (`div` 10) . it "roundtrips" $ \(tSite, _) -> property $ do
|
||||
fileContentContent <- arbitrary
|
||||
@ -61,9 +62,10 @@ spec = withApp . describe "File handling" $ do
|
||||
|
||||
suppliedContent <- runConduit $ transPipe generalize fileContentContent
|
||||
.| C.sinkLazy
|
||||
readContent <- runDB . runConduit
|
||||
$ sourceFileDB fRef'
|
||||
.| C.takeE (succ $ olength suppliedContent)
|
||||
.| C.sinkLazy
|
||||
for_ [1..10] $ \_i -> do
|
||||
readContent <- runDB . runConduit
|
||||
$ sourceFileDB fRef'
|
||||
.| C.takeE (succ $ olength suppliedContent)
|
||||
.| C.sinkLazy
|
||||
|
||||
liftIO $ readContent `shouldBe` suppliedContent
|
||||
liftIO $ readContent `shouldBe` suppliedContent
|
||||
|
||||
Loading…
Reference in New Issue
Block a user