osmosis
osmosis copied to clipboard
test(twap): table-driven test for AfterEpochEnd
Background
#2294 added pruning logic to the AfterEpochEnd hook.
We should add some test cases to ensure full coverage of the hook
Suggested Design
- test that it is no-op if current epoch != prune epoch
- test that pruning occurs with the correct "time to keep records" set
- Ensure that records earlier than the expected time are deleted
- Ensure that records later or at the expected time are kept
- test that it does not panic on pruning error
Acceptance Criteria
- full test coverage as per suggested design
This is blocked by #2294
Closed by #2443