Files
runner-images/images/ubuntu/scripts/tests/System.Tests.ps1
Lawrence Gripper ff069dce92 Bug: Mask fwupd timer on ubuntu images (#12225)
* Bug: Fully remove `fwupd` from ubuntu images

We're running on VMs in Azure and the fwupd package is not needed.

Leaving it enable means periodic refreshes show in network traffic and firewall logs.

* Update check method

* Simplify test
2025-05-22 13:59:38 -06:00

16 lines
697 B
PowerShell

# The $env:AGENT_NAME and $env:RUNNER_NAME are predefined variables for the ADO pipelines and for the GitHub actions respectively.
# If the test is running on the ADO pipeline or on the GitHub actions, the test will be skipped
Describe "Disk free space" -Skip:(-not [String]::IsNullOrEmpty($env:AGENT_NAME) -or -not [String]::IsNullOrEmpty($env:RUNNER_NAME)) {
It "Image has enough free space" {
$freeSpace = (Get-PSDrive "/").Free
$freeSpace | Should -BeGreaterOrEqual 17GB
}
}
Describe "fwupd removed" {
It "Is not present on box" {
$systemctlOutput = & systemctl list-unit-files fwupd-refresh.timer
$systemctlOutput | Should -Match "masked"
}
}