osmosis-labs / osmosis

The AMM Laboratory
https://app.osmosis.zone
Apache License 2.0
892 stars 593 forks source link

feat: [indexer] add test cases to pair_publisher::PublishPoolPairs (backport #8746) #8753

Closed mergify[bot] closed 1 month ago

mergify[bot] commented 1 month ago

This commit adds test cases to pair_publisher::PublishPoolPairs

The pair publisher is responsible for iterating over all pools and their denoms combinations, with optional creation details provided in the parameter, it also append creation details to the pair struct.

Since the test suite initializes all supported pools (concentrated, cfmm, cosmwasm) via s.App.PrepareAllSupportedPools(), the created pool IDs are 1-5, and the number of expected calls to the publisher is 12 coz: pool id 1 has 2 denoms, pool id 2 has 4 denoms, pool id 3 has 3 denoms, pool id 4 has 2 denoms, pool id 5 has 2 denoms.

Scenarios tested: