mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Add Pester tests for Windows Features (#1225)
* Add Windows Features Pester tests * Move win feature tests to separate file * Remove validation script for disc space * Remove Windows updates test
This commit is contained in:
committed by
GitHub
parent
6bc236a514
commit
956b8a0093
@@ -15,3 +15,5 @@ if ($cpu.VirtualizationFirmwareEnabled -and $cpu.SecondLevelAddressTranslationEx
|
||||
} else {
|
||||
Write-Host "Skipping installation of Hyper-V feature"
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "WindowsFeatures" -TestName "ContainersFeature"
|
||||
@@ -1,14 +0,0 @@
|
||||
################################################################################
|
||||
## File: Validate-DiskSpace.ps1
|
||||
## Desc: Validate free disk space
|
||||
################################################################################
|
||||
|
||||
$availableSpaceMB = [math]::Round((Get-PSDrive -Name C).Free / 1MB)
|
||||
$minimumFreeSpaceMB = 15 * 1024
|
||||
|
||||
Write-Host "Available disk space: $availableSpaceMB MB"
|
||||
if ($availableSpaceMB -le $minimumFreeSpaceMB)
|
||||
{
|
||||
Write-Host "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)"
|
||||
exit 1
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
################################################################################
|
||||
## File: Validate-WSL.ps1
|
||||
## Desc: Validate WSL CLI existst
|
||||
################################################################################
|
||||
|
||||
if (Get-Command -Name 'wsl')
|
||||
{
|
||||
Write-Host 'wsl is on path'
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host 'wsl not on path'
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user