Connect-DbaInstance - Skip the Windows SSPI test when the instance is not local - #10733
Merged
potatoqualitee merged 1 commit intoSep 22, 2026
Conversation
… not local (do Connect-DbaInstance) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
andreasjordan
marked this pull request as ready for review
September 20, 2026 19:52
potatoqualitee
approved these changes
Sep 21, 2026
potatoqualitee
left a comment
Member
There was a problem hiding this comment.
Reviewed the complete patch at this exact head, including SSPI test setup/cleanup, locality behavior, surrounding implementation, discussions, and the dedicated passing CI execution. No material defects found.
Member
|
nice looks good thanks |
potatoqualitee
deleted the
tests-connect-dbainstance-windowssspi-skip-remote
branch
September 22, 2026 12:56
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.
Summary
Connect-DbaInstance.WindowsSspi.Tests.ps1creates a local Windows user on the machine running the tests and a login for it on$TestConfig.InstanceSingle. That only works when the instance runs on the same machine: a remote instance cannot resolve a local account of another computer, andCREATE LOGIN [ADMIN01\dbasspi...] FROM WINDOWSfails with error 15401, which fails both tests of the file in theBeforeAll. On the lab this was deterministic in every PowerShell 7 run (2026-09-01, 2026-09-19/20).The Context now skips when the instance is not local, next to the existing platform skip.
Connect-DbaInstance.Tests.ps1and five other files already use the sameIsLocalHostskip for behaviour that only a local instance can show. The CI runners host their instances locally, so nothing changes there.Worth knowing: CI runs Pester on Windows PowerShell 5.1 only, and the Context already skips outside PowerShell 7, so this test currently only runs on a lab with PowerShell 7 and a local instance. The skip added here does not change that.
Test plan
BeforeAll.created by Claude and reviewed by Andreas Jordan
🤖 Generated with Claude Code