Skip to content

🌱 add test coverage for persistence and MCP handlers#18384

Open
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
scanner/fix-17600-persist
Open

🌱 add test coverage for persistence and MCP handlers#18384
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
scanner/fix-17600-persist

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Fixes #17600

Part of #17600 — adds unit tests for:

  • console_persistence_handler.go / console_persistence_store.go
  • mcp/cluster.go, mcp/resources.go

Tests cover pure functions, validation, and helper logic.

Changes

  • console_persistence_handler_test.go: Tests for setTerminalStatus history management, target cluster resolution, and helper functions
  • console_persistence_store_test.go: Tests for checkClusterHealth, StopWatcher, and cluster health determination logic
  • mcp/cluster_test.go: Tests for cluster health warmup coordination (tryStartClusterHealthWarmup, finishClusterHealthWarmup)
  • mcp/resources_test.go: Tests for listClusterResources helper function with timeout handling and nil result normalization

All tests focus on pure functions, validators, and helpers — no HTTP handlers requiring full server setup.

🐝 Hive Agent: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: 2c40be3f19

Add unit tests for previously untested handler files:

- console_persistence_handler_test.go: Tests for setTerminalStatus
  history management, target cluster resolution, and helper functions

- console_persistence_store_test.go: Tests for checkClusterHealth,
  StopWatcher, and cluster health determination logic

- mcp/cluster_test.go: Tests for cluster health warmup coordination
  (tryStartClusterHealthWarmup, finishClusterHealthWarmup)

- mcp/resources_test.go: Tests for listClusterResources helper
  function with timeout handling and nil result normalization

These tests cover pure functions, validators, and helpers as per
the testing guidelines — no HTTP handlers requiring full server setup.

Part of #17600

Signed-off-by: GitHub Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: GitHub Copilot <copilot@github.com>
@kubestellar-hive kubestellar-hive Bot added agent/scanner Filed by the scanner agent hive/hosted-kubestellar-console-4vkt Hive instance hosted-kubestellar-console-4vkt labels Jun 13, 2026
Copilot AI review requested due to automatic review settings June 13, 2026 18:50
@kubestellar-hive kubestellar-hive Bot added agent/scanner Filed by the scanner agent hive/hosted-kubestellar-console-4vkt Hive instance hosted-kubestellar-console-4vkt labels Jun 13, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 13, 2026

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit 2c40be3
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a2da66b3e723400081db217

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Jun 13, 2026
@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/scanner Filed by the scanner agent ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. hive/hosted-kubestellar-console-4vkt Hive instance hosted-kubestellar-console-4vkt size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tier/1-lightweight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] 33 Go API handler files lack test coverage (feedback, missions, MCP)

1 participant