Skip to content

Commit

Permalink
Extend prop_multiple_putPoolRetirement_single_readPoolRetirement.
Browse files Browse the repository at this point in the history
Extend `prop_multiple_putPoolRetirement_single_readPoolRetirement` to
call `listRetiredPools`.
  • Loading branch information
jonathanknowles committed Aug 13, 2020
1 parent cd28a2f commit fc3d579
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/core/test/unit/Cardano/Pool/DB/Properties.hs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ prop_multiple_putPoolRetirement_single_readPoolRetirement
mapM_ (uncurry putPoolRetirement) certificatePublications
mRetrievedCertificatePublication <-
run $ atomically $ readPoolRetirement sharedPoolId
poolsMarkedToRetire <-
run $ atomically $ listRetiredPools $ EpochNo maxBound
monitor $ counterexample $ unlines
[ "\nExpected certificate publication: "
, show mExpectedCertificatePublication
Expand All @@ -588,6 +590,12 @@ prop_multiple_putPoolRetirement_single_readPoolRetirement
assertWith "retrieved certificate matches expectations" $ (==)
mRetrievedCertificatePublication
mExpectedCertificatePublication
assertWith "pool is marked to retire at the correct epoch" $
case mRetrievedCertificatePublication of
Nothing ->
null poolsMarkedToRetire
Just (_publicationTime, retirementCert) ->
poolsMarkedToRetire == [retirementCert]

certificatePublications
:: [(CertificatePublicationTime, PoolRetirementCertificate)]
Expand Down

0 comments on commit fc3d579

Please sign in to comment.