win_chocolatey: Add integration tests (#21930)

And also fix a known issue.
This commit is contained in:
Dag Wieers 2017-02-27 12:36:52 +01:00 committed by John R Barker
commit a66d5dcc43
3 changed files with 64 additions and 2 deletions

View file

@ -110,7 +110,7 @@ Function Choco-IsInstalled
Throw "Error checking installation status for $package"
}
If ("$results" -match "$package .* (\d+) packages installed.")
If ("$output" -match "(\d+) packages installed.")
{
return $matches[1] -gt 0
}
@ -200,7 +200,7 @@ Function Choco-Upgrade
Throw "Error installing $package"
}
if ("$results" -match ' upgraded (\d+)/\d+ package\(s\)\. ')
if ("$output" -match ' upgraded (\d+)/\d+ package\(s\)\. ')
{
if ($matches[1] -gt 0)
{