Skip to content

test(creators): verify maximum page size enforcement on GET /creators#573

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
techAlhaji:test/creator-list-page-size-limit
Jul 18, 2026
Merged

test(creators): verify maximum page size enforcement on GET /creators#573
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
techAlhaji:test/creator-list-page-size-limit

Conversation

@techAlhaji

Copy link
Copy Markdown
Contributor

Closes #568

Summary

Adds integration test coverage for the GET /creators endpoint to verify enforcement of the configured maximum page size.

The test ensures that requests exceeding the allowed limit value cannot return an unbounded number of creator records and that the API behaves consistently when the limit is exceeded.


What Changed

🧪 Integration Test

Added an integration test for:

GET /creators

The test:

  • Sends a request with a limit greater than the configured maximum.
  • Verifies the API either:
    • Caps the response to the configured maximum page size, or
    • Returns a 400 Bad Request.
  • Confirms the response never contains more records than the configured maximum.

Validation

Verified that:

  • Over-limit requests are handled consistently.
  • Response size never exceeds the configured maximum.
  • Pagination safeguards prevent excessive data retrieval.

Benefits

  • Prevents unbounded API responses.
  • Protects server resources.
  • Ensures predictable pagination behavior.
  • Guards against future regressions.
  • Improves API reliability.

Testing

Executed:

npm test

Verified:

  • Over-limit pagination request
  • Maximum page size enforcement
  • Consistent API behavior

Checklist

  • Added integration test for GET /creators
  • Tested requests exceeding maximum page size
  • Verified response is capped or rejected
  • Confirmed returned records never exceed configured maximum
  • All tests pass

@Chucks1093
Chucks1093 merged commit 81eb738 into accesslayerorg:main Jul 18, 2026
1 check passed
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.

Add integration test for creator list max page size being enforced

2 participants