Files
runner-images/images/win/scripts/Tests/Vsix.Tests.ps1
Mikhail Timofeev cd4ecad2e6 [Windows] Install vsix extensions using CDN endpoint (#3244)
* Install extensions for VS19

* Get vsix packages name in runtime

* add a bit of debug

* Get extension id from the marketplace uri

* Add extension name

* skip vcredist installation

* Add Get-VsixExtenstionFromMarketplace to ImageHelpers.psm1

* Fix DownloadUri name in the function

* DownloadUri in lower case

* Add packages to the readme

* Add a condition to software report

* fix spelling in function

* Simplify toolset + get rid of backticks
2021-04-23 19:38:43 +03:00

20 lines
724 B
PowerShell

Describe "Vsix" {
$toolset = Get-ToolsetContent
$requiredVsixs = $toolset.visualStudio.vsix
$allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages
$testCases = $requiredVsixs | ForEach-Object {
$vsix = Get-VsixExtenstionFromMarketplace -ExtensionMarketPlaceName $_
@{
VsixName = $vsix.ExtensionName
VsixId = $vsix.VsixId
AllPackages = $allPackages
}
}
if ($testCases.Count -gt 0) {
It "Extension <VsixName> is installed" -TestCases $testCases {
$objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId }
$objVsix | Should -Not -BeNullOrEmpty
}
}
}