Tests: Use busctl instead of gdbus

Systemd ships with busctl that can be used instead of gdbus. Use it to
reduce test dependencies.
This commit is contained in:
Till Maas 2020-05-11 17:30:51 +02:00
parent bcef3e23cf
commit da918d0712

View file

@ -54,14 +54,16 @@
dropped.
that: error_trigger.failed
# yamllint disable-line rule:line-length
- command: gdbus introspect --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager/Checkpoint --recurse
register: checkpoints
- command: busctl --system tree --list org.freedesktop.NetworkManager
register: nm_dbus_objects
- debug:
var: checkpoints
var: nm_dbus_objects
- name: Assert that no checkpoints are left
assert:
fail_msg: Checkpoints not cleaned up
that: checkpoints.stdout_lines | length == 2
that: >
'/org/freedesktop/NetworkManager/Checkpoint/' not in
nm_dbus_objects.stdout_lines
always:
- block:
# Use internal module directly for speedup