Skip to content

test(cli): cover dataset name resolution branches - #317

Open
plum2003 wants to merge 1 commit into
griddynamics:mainfrom
plum2003:test/dataset-service-resolution
Open

test(cli): cover dataset name resolution branches#317
plum2003 wants to merge 1 commit into
griddynamics:mainfrom
plum2003:test/dataset-service-resolution

Conversation

@plum2003

Copy link
Copy Markdown

Summary

  • add focused unit coverage for DatasetService.resolve_dataset_name
  • cover zero, one, and two template-prefix matches with a fake client
  • verify the configured page size is forwarded to list_datasets
  • leave production behavior unchanged

Validation

  • targeted tests: 3 passed
  • complete CLI tests: 59 passed
  • type validation and pre-commit checks passed

Closes #259

Signed-off-by: Jiale Li <142802974+plum2003@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 20, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds focused unit tests for DatasetService.resolve_dataset_name in the rosetta-cli to ensure the dataset auto-detection logic is exercised directly (rather than being monkeypatched away), aligning with the gap called out in #259.

Changes:

  • Introduces a small FakeClient to drive deterministic list_datasets responses.
  • Adds parametrized coverage for 0/1/2 template-prefix match outcomes, including the ambiguous-match failure path.
  • Asserts the configured page_size is forwarded to the client’s list_datasets call.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

[ROSETTA] DatasetService.resolve_dataset_name has no real unit test coverage

2 participants