Skip to content

test(render): add unit tests for DatasetHandlerImpl - #1534

Open
sabhi128 wants to merge 2 commits into
OpenCSGs:mainfrom
sabhi128:feat-dataset-handler-tests
Open

test(render): add unit tests for DatasetHandlerImpl#1534
sabhi128 wants to merge 2 commits into
OpenCSGs:mainfrom
sabhi128:feat-dataset-handler-tests

Conversation

@sabhi128

Copy link
Copy Markdown
Contributor

Summary of Changes

This PR expands backend test coverage by adding unit tests for the DatasetHandlerImpl under internal/handlers/render/.

Changes:

  • New File: internal/handlers/render/datasets_test.go
    • Added route rendering coverage for:
      1. List route (datasets_index template rendering).
      2. Detail route (parameter mapping of namespace and dataset_name to datasets_show template).
      3. New route (checks context layout and license dictionary injection).

All rendering calls are tested in isolation using Mockery's testifying mocks.

Copilot AI lite review requested due to automatic review settings August 28, 2026 10:38

Copilot 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.

Pull request overview

This PR adds unit tests to improve backend rendering coverage for DatasetHandlerImpl, verifying that dataset routes invoke template rendering with expected template names and key view-model fields.

Changes:

  • Added new unit test file covering List, Detail, and New routes for datasets.
  • Introduced mock-based assertions around RenderTemplate calls and selected template data fields.

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

Comment thread internal/handlers/render/datasets_test.go
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.

2 participants