Skip to content

Commit

Permalink
tests: expect "daemon: dbus" service to be initially inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
jhenstridge committed Dec 10, 2018
1 parent e9eac28 commit 990033d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/main/dbus-activation-system/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ execute: |
echo "A service activation file has been created"
[ -f /var/lib/snapd/dbus/system-services/io.snapcraft.SnapDbusService.service ]
echo "Ensure that the service is not running"
systemctl stop snap.test-snapd-dbus-service.system.service
echo "The service is not initially running"
! systemctl is-active snap.test-snapd-dbus-service.system.service
echo "Making a method call wakes the service"
dbus-send --system --print-reply \
--dest=io.snapcraft.SnapDbusService /io/snapcraft/SnapDbusService \
io.snapcraft.ExampleInterface.ExampleMethod | MATCH hello
echo "The corresponding D-Bus service is now running"
systemctl is-active snap.test-snapd-dbus-service.system.service
echo "Removing the snap also removes the service activation file"
snap remove test-snapd-dbus-service
[ ! -f /var/lib/snapd/dbus/system-services/io.snapcraft.SnapDbusService.service ]

0 comments on commit 990033d

Please sign in to comment.