From 0a100e5d8f499bafbfad26d9fb6040f14af486f3 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 27 Jun 2023 14:37:47 -0400 Subject: [PATCH] meta: firewall: Fix firewalld test with non-abstract sockets On a recent Fedora Rawhide, dbus-daemon-1.14.8-1 prints a string prefixed by 'unix:path' instead of the expected 'unix:abstract', thereby failing the test. Allowing this alternate prefix fixes the test, so for communication with the daemon it is not relevant. Signed-off-by: Phil Sutter --- plugins/meta/firewall/firewall_firewalld_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/meta/firewall/firewall_firewalld_test.go b/plugins/meta/firewall/firewall_firewalld_test.go index cfb3a1f6..b81670de 100644 --- a/plugins/meta/firewall/firewall_firewalld_test.go +++ b/plugins/meta/firewall/firewall_firewalld_test.go @@ -86,7 +86,8 @@ func spawnSessionDbus(wg *sync.WaitGroup) (string, *exec.Cmd) { bytes, err := bufio.NewReader(stdout).ReadString('\n') Expect(err).NotTo(HaveOccurred()) busAddr := strings.TrimSpace(bytes) - Expect(strings.HasPrefix(busAddr, "unix:abstract")).To(BeTrue()) + Expect(strings.HasPrefix(busAddr, "unix:abstract") || + strings.HasPrefix(busAddr, "unix:path")).To(BeTrue()) var startWg sync.WaitGroup wg.Add(1)