From a1cf69345ecf6ead26b4b2206048e0b3011b95c6 Mon Sep 17 00:00:00 2001 From: Lawrence Gripper Date: Fri, 23 May 2025 14:23:44 +0100 Subject: [PATCH] Update images/ubuntu/scripts/tests/System.Tests.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- images/ubuntu/scripts/tests/System.Tests.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/images/ubuntu/scripts/tests/System.Tests.ps1 b/images/ubuntu/scripts/tests/System.Tests.ps1 index 2204199c0..1396613ae 100644 --- a/images/ubuntu/scripts/tests/System.Tests.ps1 +++ b/images/ubuntu/scripts/tests/System.Tests.ps1 @@ -10,6 +10,11 @@ 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 -eq $null) -or ($systemctlOutput | Should -Match "masked") + if ($systemctlOutput -eq $null) { + # Service not installed, test passes + return + } else { + $systemctlOutput | Should -Match "masked" + } } }