mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 14:47:08 +00:00
Make test robust
This commit is contained in:
@@ -10,11 +10,11 @@ Describe "Disk free space" -Skip:(-not [String]::IsNullOrEmpty($env:AGENT_NAME)
|
|||||||
Describe "fwupd removed" {
|
Describe "fwupd removed" {
|
||||||
It "Is not present on box" {
|
It "Is not present on box" {
|
||||||
$systemctlOutput = & systemctl list-unit-files fwupd-refresh.timer
|
$systemctlOutput = & systemctl list-unit-files fwupd-refresh.timer
|
||||||
if ($systemctlOutput -eq $null) {
|
# When enabled the output looks like this:
|
||||||
# Service not installed, test passes
|
#❯ systemctl list-unit-files fwupd-refresh.timer
|
||||||
return
|
#UNIT FILE STATE VENDOR PRESET
|
||||||
} else {
|
#fwupd-refresh.timer enabled enabled
|
||||||
$systemctlOutput | Should -Match "masked"
|
#1 unit files listed.
|
||||||
}
|
$systemctlOutput | Should -Not -Match "enabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user