Skip to content

Commit

Permalink
Make tests run in Property (ResourceT IO)
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Dec 24, 2024
1 parent 252cd14 commit 4bc2b8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cardano-cli/test/cardano-cli-golden/Test/Golden/Byron/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ hprop_byronTx = propertyOnce $ H.moduleWorkspace "tmp" $ \tempDir -> do

compareByronTxs createdTx expectedTx

getTxByteString :: (MonadTest m, HasCallStack) => FilePath -> m (ATxAux ByteString)
getTxByteString :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> m (ATxAux ByteString)
getTxByteString txFp = do
eATxAuxBS <- liftIO . runExceptT $ readByronTx $ File txFp
case eATxAuxBS of
Left err -> failWith Nothing . docToString $ renderByronTxError err
Right aTxAuxBS -> return aTxAuxBS

compareByronTxs :: (MonadTest m, HasCallStack) => FilePath -> FilePath -> m ()
compareByronTxs :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> FilePath -> m ()
compareByronTxs createdTx expectedTx = do
createdATxAuxBS <- getTxByteString createdTx
expectedATxAuxBS <- getTxByteString expectedTx
Expand Down

0 comments on commit 4bc2b8e

Please sign in to comment.