From db8c07df2f0ee30a372736c0941e0487ed64ec0b Mon Sep 17 00:00:00 2001 From: wmarshall Date: Wed, 25 Sep 2024 12:45:06 -0500 Subject: [PATCH] Force homebrew tests to use specific prefix path. --- .../test/private/Test-CLIVersion.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/SecretManagement.Warden.Extension/test/private/Test-CLIVersion.Tests.ps1 b/SecretManagement.Warden.Extension/test/private/Test-CLIVersion.Tests.ps1 index 924e648..0390501 100644 --- a/SecretManagement.Warden.Extension/test/private/Test-CLIVersion.Tests.ps1 +++ b/SecretManagement.Warden.Extension/test/private/Test-CLIVersion.Tests.ps1 @@ -49,6 +49,7 @@ Describe "Test-CLIVersion" { switch($Source) { "brew" { function brew { return $null } + $env:HOMEBREW_PREFIX = "/home/linuxbrew/.linuxbrew" # Sets HOMEBREW_PREFIX to what is expected from the Mocked bw. Mock -CommandName "brew" -ParameterFilter {$args[0] -eq "list" -and $args[1] -eq "bitwarden-cli" -and $args[2] -eq "--versions"} ` -MockWith { return Import-Clixml -Path (Join-Path $PSScriptRoot "mock-cli" "response" "brew-list.xml")} -Verifiable }