From fb7e986316c26e76b8eeaa3bc8e699b972d79e75 Mon Sep 17 00:00:00 2001 From: lawrencegripper Date: Tue, 27 May 2025 09:33:33 +0100 Subject: [PATCH] Fix up by using list-unit This avoids the output containing the preset vendor value. --- images/ubuntu/scripts/tests/System.Tests.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/images/ubuntu/scripts/tests/System.Tests.ps1 b/images/ubuntu/scripts/tests/System.Tests.ps1 index 96a176912..e609fea7c 100644 --- a/images/ubuntu/scripts/tests/System.Tests.ps1 +++ b/images/ubuntu/scripts/tests/System.Tests.ps1 @@ -9,12 +9,13 @@ Describe "Disk free space" -Skip:(-not [String]::IsNullOrEmpty($env:AGENT_NAME) Describe "fwupd removed" { It "Is not present on box" { - $systemctlOutput = & systemctl list-unit-files fwupd-refresh.timer + $systemctlOutput = & systemctl list-unit fwupd-refresh.timer --no-legend + # When disabled the output looks like this: + #❯ systemctl list-units fwupd-refresh.timer --no-legend + #● fwupd-refresh.timer masked failed failed fwupd-refresh.timer # When enabled the output looks like this: - #❯ systemctl list-unit-files fwupd-refresh.timer - #UNIT FILE STATE VENDOR PRESET - #fwupd-refresh.timer enabled enabled - #1 unit files listed. - $systemctlOutput | Should -Not -Match "enabled" + #❯ systemctl list-units fwupd-refresh.timer --no-legend + #fwupd-refresh.timer loaded active waiting Refresh fwupd metadata regularly + $systemctlOutput | Should -Not -Match "active" } }