Skip to content

Commit c0aa632

Browse files
Copy-DbaLogin - Fix test to use Join-Path for cross-platform compatibility
The test was using Windows backslashes which failed on Linux CI runners. Updated to use Join-Path which works on all platforms. (do Copy-DbaLogin) Co-authored-by: Chrissy LeMaire <[email protected]>
1 parent 3d50c1c commit c0aa632

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Copy-DbaLogin.Tests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ Describe $CommandName -Tag IntegrationTests {
294294
# This test verifies that the protection code exists and is properly structured
295295
# Manual testing should be performed in a domain environment to verify the protection works
296296

297-
$functionContent = Get-Content "$($TestConfig.ModuleBase)\public\Copy-DbaLogin.ps1" -Raw
297+
$functionPath = Join-Path -Path $TestConfig.ModuleBase -ChildPath "public" | Join-Path -ChildPath "Copy-DbaLogin.ps1"
298+
$functionContent = Get-Content $functionPath -Raw
298299
$functionContent | Should -BeLike '*LoginType -eq "WindowsGroup"*'
299300
$functionContent | Should -BeLike '*potential lockout risk*'
300301
$functionContent | Should -BeLike '*xp_logininfo*'

0 commit comments

Comments
 (0)