Update-DbaInstance - Use the temp folder of the test configuration in the tests - #10732
Open
andreasjordan wants to merge 2 commits into
Open
andreasjordan wants to merge 2 commits into
andreasjordan wants to merge 2 commits into
Conversation
… the tests (do Update-DbaInstance) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…older is a network path (do Update-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 fixture paths, download assertions, production path handling, cleanup, discussions, and CI logs exercising the affected test. No material defects found.
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
Update-DbaInstance.Tests.ps1builds its fake installer folder at a fixedC:\Temp\dbatools_Update-DbaInstance(unit tests and the skipped integration Describe). Every other test file writes below$TestConfig.Temp, which isC:\Tempon CI and a folder per test set on the lab.With two runs on one machine the fixed path is shared: during the parallel full runs of 2026-09-19 one run created and removed the folder while the other run's environment check saw it and flagged two unrelated test files (
Add-DbaDbFile,Add-DbaDbMirrorMonitor) as leaving a legacy temp folder behind.The folder now lives in
$TestConfig.Temp, like everything else. On CI that is the sameC:\Tempas before.One assertion had to follow: the
-Downloadtest expectsSave-DbaKbUpdateto be called with the local temp folder, which is what the command does for a local-Path. For a network share it downloads into the share itself (Test-NetworkPathat the top of the download loop). On a lab where$TestConfig.Tempis a share, the expected folder is therefore the share, and the test now derives the expectation from the same rule. On CI nothing changes.Test plan
Update-DbaInstance.Tests.ps1green on PowerShell 7 and Windows PowerShell 5.1 on the lab, where$TestConfig.Tempis a UNC path: 69 tests, 68 passed, 1 skipped.Save-DbaKbUpdatecalled with the share as-Path.dbatools_Update-DbaInstancefolder left behind, neither below$TestConfig.Tempnor inC:\Temp.created by Claude and reviewed by Andreas Jordan
🤖 Generated with Claude Code