Skip to content

Commit

Permalink
test: Make integration test output more useful (#4984)
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb authored Mar 1, 2024
1 parent 5c15e79 commit b538549
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/integration_tests/bugs/test_lp1813396.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b538549

Please sign in to comment.