Skip to content

test: expand data source API coverage - #3885

Open
yyqdbngt wants to merge 1 commit into
apache:rocketmq-studiofrom
yyqdbngt:codex/yy-deepen-data-source-api-tests
Open

test: expand data source API coverage#3885
yyqdbngt wants to merge 1 commit into
apache:rocketmq-studiofrom
yyqdbngt:codex/yy-deepen-data-source-api-tests

Conversation

@yyqdbngt

@yyqdbngt yyqdbngt commented Sep 6, 2026

Copy link
Copy Markdown

Motivation

The data source API tests covered the happy paths of load/create/update, the multi-page export, and delete/test basics, but left authenticated connections, bearer tokens, short last pages, and the max-page guard untested. This PR grows the suite from 3 to 7 cases.

Changes

  • testDataSource forwards username/password for basic-auth sources and bearerToken for token-auth sources.
  • listAllDataSources stops early when the last page comes back short (fewer items than the declared total).
  • listAllDataSources throws Data source export exceeded 100 pages when pages keep returning full inventories.

Verification

  • vitest run src/api/settings.test.ts: 7/7 passed
  • tsc --noEmit: clean
  • eslint src/api/settings.test.ts: clean

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Expands data source API test coverage from 3 to 7 cases — adds authenticated/bearer token test paths, early pagination termination, and max-page guard.

LGTM — thorough coverage of pagination edge cases and auth forwarding.


Automated review by github-manager-bot

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.

3 participants