diff --git a/images/windows/scripts/build/Install-MongoDB.ps1 b/images/windows/scripts/build/Install-MongoDB.ps1 index 2eaecc390a13..ef187f9dae39 100644 --- a/images/windows/scripts/build/Install-MongoDB.ps1 +++ b/images/windows/scripts/build/Install-MongoDB.ps1 @@ -49,8 +49,9 @@ if (Test-IsWin25) { -UrlMatchPattern "mongosh-*-x64.msi" Install-Binary -Type MSI ` - -Url $mongoshDownloadUrl ` - -ExpectedSignature 'A5BBE2A6DA1D2A6E057EF870267E6A91E4D56BAA' + -Url $mongoshDownloadUrl ` + -ExtraInstallArgs @('ALLUSERS=1') ` + -ExpectedSignature 'A5BBE2A6DA1D2A6E057EF870267E6A91E4D56BAA' } Invoke-PesterTests -TestFile "Databases" -TestName "MongoDB" diff --git a/images/windows/scripts/tests/Databases.Tests.ps1 b/images/windows/scripts/tests/Databases.Tests.ps1 index 08e73befd4a1..de30a2616f09 100644 --- a/images/windows/scripts/tests/Databases.Tests.ps1 +++ b/images/windows/scripts/tests/Databases.Tests.ps1 @@ -30,8 +30,10 @@ Describe "MongoDB" { } } - Context "Shell" -Skip:(-not (Test-IsWin19) -or -not (Test-IsWin22)) { - "mongosh --version" | Should -Not -BeNullOrEmpty + Context "Shell" -Skip:(-not (Test-IsWin25)) { + It "mongosh" { + "mongosh --version" | Should -ReturnZeroExitCode + } } }