Skip to content

commitmentopts: add page-cap unit tests for ElastiCache/OpenSearch/Redshift/MemoryDB/EC2 probers #62

@cristim

Description

@cristim

#54's internal/commitmentopts/probe_test.go has TestRDSProber_PageCap asserting the prober stops after maxPages=5 iterations. The other five probers use the same loop structure but lack equivalent coverage.

Risk

A future refactor that changes one prober's loop independently could silently lose the page cap, leading to unbounded pagination under pathological AWS responses.

Action

Add Test{ElastiCache,OpenSearch,Redshift,MemoryDB,EC2}Prober_PageCap tests mirroring the RDS pattern. Or extract the pagination loop into a shared helper and test it once — the latter is probably cleaner given all six loops are identical.

Surfaced during review of #54.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions