Skip to content

Commit

Permalink
Use SinglePoolCertificateSequence in prop_readPoolLifeCycleStatus.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Aug 13, 2020
1 parent fd9dc69 commit 5c351d7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/core/test/unit/Cardano/Pool/DB/Properties.hs
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,10 @@ prop_multiple_putPoolRetirement_single_readPoolRetirement
--
prop_readPoolLifeCycleStatus
:: DBLayer IO
-> PoolId
-> [PoolCertificate]
-> SinglePoolCertificateSequence
-> Property
prop_readPoolLifeCycleStatus
DBLayer {..} sharedPoolId certificatesManyPoolIds =
DBLayer {..} (SinglePoolCertificateSequence sharedPoolId certificates) =
monadicIO (setup >> prop)
where
setup = run $ atomically cleanDB
Expand Down Expand Up @@ -669,8 +668,6 @@ prop_readPoolLifeCycleStatus
, ii <- [0 .. 3]
]

certificates = setPoolId sharedPoolId <$> certificatesManyPoolIds

toRegistrationCertificate = \case
Registration cert -> Just cert
Retirement _ -> Nothing
Expand All @@ -685,12 +682,6 @@ prop_readPoolLifeCycleStatus
Retirement cert ->
putPoolRetirement cpt cert

setPoolId newPoolId = \case
Registration cert -> Registration
$ set #poolId newPoolId cert
Retirement cert -> Retirement
$ set #poolId newPoolId cert

prop_rollbackRegistration
:: DBLayer IO
-> SlotNo
Expand Down

0 comments on commit 5c351d7

Please sign in to comment.