Skip to content

Make test_list_domains pagination-safe - #210

Merged
amarcozzi merged 1 commit into
mainfrom
fix-test-list-domains-pagination
Aug 26, 2026
Merged

Make test_list_domains pagination-safe#210
amarcozzi merged 1 commit into
mainfrom
fix-test-list-domains-pagination

Conversation

@amarcozzi

Copy link
Copy Markdown
Contributor

tests/v2/test_domains.py::TestListDomains::test_list_domains fails intermittently in CI (e.g. run 32998054983):

AssertionError: assert '5f60a170...' in ['006cf022...', '0160d1a4...', ...]

list_domains() returns only the first page (page=0, size=100, default sort). The test account now holds more than one page of domains, so the freshly-created test_domain is not guaranteed to be on page 0 under the default sort, and the assertion fails.

Sort created_on descending so the just-created domain is always on the first page — matching the SDK's documented pagination-safe idiom. Verified against the live API.

This is a pre-existing test-quality issue, unrelated to any recent feature PR.

list_domains() returns only the first page (size 100, default sort), so
once the test account holds more than a page of domains the freshly
created test_domain need not appear on it and the assertion fails
intermittently in CI. Sort newest-first so the just-created domain is
always on the first page.
@amarcozzi
amarcozzi merged commit c423750 into main Aug 26, 2026
3 checks passed
@amarcozzi
amarcozzi deleted the fix-test-list-domains-pagination branch August 26, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant