test: enusre arc roundtrips

This commit is contained in:
Gregor Kleen 2021-02-11 08:53:09 +01:00
parent 5794ca384c
commit ef7a743c60

View File

@ -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