Skip to content

Commit

Permalink
fixup! Add MintBurn tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeinsky committed Feb 8, 2023
1 parent 8f213ed commit 9005d29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions marconi/test/MintBurn.hs
Expand Up @@ -110,7 +110,7 @@ queryMintedValues = H.property $ do
MintBurn.MintBurnResult queryResult <- liftIO $ RI.query RI.QEverything indexer MintBurn.Everything
-- Compare the sets of events inserted to the indexer and the set
-- gotten out of the indexer:
equalSet (MintBurn.groupBySlotNo insertedEvents) (MintBurn.fromRows queryResult)
equalSet (MintBurn.groupBySlotAndHash insertedEvents) (MintBurn.fromRows queryResult)

-- | Insert some events to an indexer, then recreate it from what is
-- on disk (the in-memory part is lost), then query it and find all
Expand All @@ -122,7 +122,7 @@ resume = H.property $ do
-- Open a new indexer based off of the old indexers sql connection:
indexer' <- liftIO $ mkNewIndexerBasedOnOldDb indexer
MintBurn.MintBurnResult queryResult <- liftIO $ RI.query RI.QEverything indexer' MintBurn.Everything
let expected = MintBurn.groupBySlotNo $ take (eventsPersisted bufferSize (length events)) events
let expected = MintBurn.groupBySlotAndHash $ take (eventsPersisted bufferSize (length events)) events
-- The test: events that were persisted are exactly those we get from the query.
equalSet expected (MintBurn.fromRows queryResult)

Expand Down

0 comments on commit 9005d29

Please sign in to comment.