[Repo Assist] test(tray): add unit tests for NodeCapabilityGating.GetLocalNodeCapabilities - #495
Merged
shanselman merged 1 commit intoMay 21, 2026
Conversation
…ilities Add 8 tests covering the null-guard, case-insensitive lookup, and return-value contracts of the untested GetLocalNodeCapabilities helper. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shanselman
marked this pull request as ready for review
May 21, 2026 20:00
shanselman
deleted the
repo-assist/test-node-capability-gating-798a50894d4678b9
branch
May 21, 2026 20:01
This was referenced May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated pull request from Repo Assist.
What
Adds 8 unit tests for
NodeCapabilityGating.GetLocalNodeCapabilities, a pure helper function that was introduced alongside the system-run permissions toggle but had no test coverage.Why
GetLocalNodeCapabilitiesis used by the tray menu, instances page, connection page, and permissions page to resolve the local node's capability list. Regressions here could silently cause capabilities to appear/disappear across surfaces. The tests lock in the null-guard contracts, case-insensitive ID matching, and return-value semantics.Tests added
NullNodes_ReturnsNullEmptyNodes_ReturnsNullNullDeviceId_ReturnsNullEmptyDeviceId_ReturnsNullNoMatchingNode_ReturnsNullMatchingNode_ReturnsCapabilitiesMatchingNodeCaseInsensitive_ReturnsCapabilitiesNodeWithNoCapabilities_ReturnsEmptyListTest Status
All 9 pre-existing tests + 8 new tests pass. Pre-existing failures in
LocalGatewaySetupTestsare infrastructure-only (WSL not available in CI) and unrelated to this PR.