From b538549d89bc69d979bfa9eb464b02377a429573 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Thu, 29 Feb 2024 21:07:40 -0700 Subject: [PATCH] test: Make integration test output more useful (#4984) --- tests/integration_tests/bugs/test_lp1813396.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/integration_tests/bugs/test_lp1813396.py b/tests/integration_tests/bugs/test_lp1813396.py index d726e518b4c..99ac92b289c 100644 --- a/tests/integration_tests/bugs/test_lp1813396.py +++ b/tests/integration_tests/bugs/test_lp1813396.py @@ -33,9 +33,11 @@ def test_gpg_no_tty(client: IntegrationInstance): ] verify_ordered_items_in_text(to_verify, log) verify_clean_log(log) - processes_in_cgroup = int( - client.execute( - "systemd-cgls -u cloud-config.service 2>/dev/null | wc -l" - ).stdout + control_groups = client.execute( + "systemd-cgls -u cloud-config.service 2>/dev/null | wc -l" + ).stdout + processes_in_cgroup = len(control_groups.split("\n")) + assert processes_in_cgroup < 2, ( + "Cloud-init didn't clean up after itself, " + f"cloud-config has remaining daemons:\n{control_groups}" ) - assert processes_in_cgroup < 2