From c9d728fd252f923878650803fa9a50903bd46a98 Mon Sep 17 00:00:00 2001 From: Shamil Mubarakshin <127750046+shamil-mubarakshin@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:16:24 +0100 Subject: [PATCH] [windows-2025] Install mongosh for ALLUSERS and enable test (#11224) --- images/windows/scripts/build/Install-MongoDB.ps1 | 5 +++-- images/windows/scripts/tests/Databases.Tests.ps1 | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) 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 + } } }