Skip to content

Commit

Permalink
Fix existing stake pool test checking metadata exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed Oct 13, 2020
1 parent a0ca926 commit d6297aa
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ import Test.Integration.Framework.TestData
, errMsg404NoSuchPool
, errMsg404NoWallet
)
import Test.Integration.Scenario.API.Shelley.Settings
( updateMetadataSource )

import qualified Cardano.Wallet.Api.Link as Link
import qualified Data.ByteString as BS
Expand Down Expand Up @@ -735,6 +737,7 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do
saturation `shouldSatisfy` (any (> 0))

it "contains pool metadata" $ \ctx -> do
updateMetadataSource ctx "direct"
eventually "metadata is fetched" $ do
r <- listPools ctx arbitraryStake
let metadataPossible = Set.fromList
Expand Down Expand Up @@ -771,6 +774,8 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do
mapMaybe (fmap getApiT . view #metadata) pools
metadataActual
`shouldSatisfy` (`Set.isSubsetOf` metadataPossible)
metadataActual
`shouldSatisfy` (not . Set.null)
]

it "contains and is sorted by non-myopic-rewards" $ \ctx -> do
Expand Down

0 comments on commit d6297aa

Please sign in to comment.