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
|
suppliedContent <- runConduit $ transPipe generalize fileContentContent
|
||||||
.| C.sinkLazy
|
.| C.sinkLazy
|
||||||
readContent <- runConduit $ sourceFileMinio fileReferenceContentContent
|
for_ [1..10] $ \_i -> do
|
||||||
.| C.takeE (succ $ olength suppliedContent)
|
readContent <- runConduit $ sourceFileMinio fileReferenceContentContent
|
||||||
.| C.sinkLazy
|
.| C.takeE (succ $ olength suppliedContent)
|
||||||
|
.| C.sinkLazy
|
||||||
|
|
||||||
liftIO $ readContent `shouldBe` suppliedContent
|
liftIO $ readContent `shouldBe` suppliedContent
|
||||||
describe "DB" $ do
|
describe "DB" $ do
|
||||||
modifyMaxSuccess (`div` 10) . it "roundtrips" $ \(tSite, _) -> property $ do
|
modifyMaxSuccess (`div` 10) . it "roundtrips" $ \(tSite, _) -> property $ do
|
||||||
fileContentContent <- arbitrary
|
fileContentContent <- arbitrary
|
||||||
@ -61,9 +62,10 @@ spec = withApp . describe "File handling" $ do
|
|||||||
|
|
||||||
suppliedContent <- runConduit $ transPipe generalize fileContentContent
|
suppliedContent <- runConduit $ transPipe generalize fileContentContent
|
||||||
.| C.sinkLazy
|
.| C.sinkLazy
|
||||||
readContent <- runDB . runConduit
|
for_ [1..10] $ \_i -> do
|
||||||
$ sourceFileDB fRef'
|
readContent <- runDB . runConduit
|
||||||
.| C.takeE (succ $ olength suppliedContent)
|
$ sourceFileDB fRef'
|
||||||
.| C.sinkLazy
|
.| C.takeE (succ $ olength suppliedContent)
|
||||||
|
.| C.sinkLazy
|
||||||
|
|
||||||
liftIO $ readContent `shouldBe` suppliedContent
|
liftIO $ readContent `shouldBe` suppliedContent
|
||||||
|
|||||||
Reference in New Issue
Block a user