From 7ee98cf395ad03a5aa366d2884b48b49d09ff120 Mon Sep 17 00:00:00 2001 From: Christopher Kreft Date: Fri, 17 Jul 2026 14:07:16 +0200 Subject: [PATCH] tests: make systemctl service check robust --- t/40_e2e_deb_linux_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/t/40_e2e_deb_linux_test.go b/t/40_e2e_deb_linux_test.go index aeb32feb..0dfb65a7 100644 --- a/t/40_e2e_deb_linux_test.go +++ b/t/40_e2e_deb_linux_test.go @@ -69,8 +69,16 @@ func TestDEBinstaller(t *testing.T) { runCmd(t, &cmd{ Cmd: "systemctl", - Args: []string{"status", "snclient"}, - Like: []string{`/usr/bin/snclient`, `running`}, + Args: []string{"is-active", "--quiet", "snclient"}, + }) + + // Check the configured command separately. The process tree in the + // human-readable status output may temporarily contain only the process + // name while the service is starting. + runCmd(t, &cmd{ + Cmd: "systemctl", + Args: []string{"show", "--property=ExecStart", "--value", "snclient"}, + Like: []string{`/usr/bin/snclient`}, }) // add custom .ini with correct ownership for snclient user