🌱 add test coverage for persistence and MCP handlers#18384
🌱 add test coverage for persistence and MCP handlers#18384kubestellar-hive[bot] wants to merge 1 commit into
Conversation
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>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole canceled.
|
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
Fixes #17600
Part of #17600 — adds unit tests for:
console_persistence_handler.go/console_persistence_store.gomcp/cluster.go,mcp/resources.goTests cover pure functions, validation, and helper logic.
Changes
setTerminalStatushistory management, target cluster resolution, and helper functionscheckClusterHealth,StopWatcher, and cluster health determination logictryStartClusterHealthWarmup,finishClusterHealthWarmup)listClusterResourceshelper function with timeout handling and nil result normalizationAll 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