Skip to content

Commit

Permalink
t/main/services-user: add case for --system --users=all
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Mar 13, 2024
1 parent 890f400 commit 2f78e1e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/main/services-user/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,20 @@ execute: |
tests.session -u test2 exec systemctl --user is-active snap.test-snapd-user-service.svc1.service | MATCH "active"
tests.session -u test2 exec systemctl --user is-active snap.test-snapd-user-service.svc2.service | MATCH "active"
echo "(root) Stopping all services for snap again"
snap stop test-snapd-user-service
systemctl status snap.test-snapd-user-service.svc3.service | MATCH "inactive"
systemctl status snap.test-snapd-user-service.svc4.service | MATCH "inactive"
tests.session -u test exec systemctl --user is-active snap.test-snapd-user-service.svc1.service | MATCH "inactive"
tests.session -u test exec systemctl --user is-active snap.test-snapd-user-service.svc2.service | MATCH "inactive"
tests.session -u test2 exec systemctl --user is-active snap.test-snapd-user-service.svc1.service | MATCH "inactive"
tests.session -u test2 exec systemctl --user is-active snap.test-snapd-user-service.svc2.service | MATCH "inactive"
echo "(root) Starting user services for snap with scopes --system and --users=all"
snap start --system --users=all test-snapd-user-service
systemctl status snap.test-snapd-user-service.svc3.service | MATCH "active"
systemctl status snap.test-snapd-user-service.svc4.service | MATCH "active"
tests.session -u test exec systemctl --user is-active snap.test-snapd-user-service.svc1.service | MATCH "active"
tests.session -u test exec systemctl --user is-active snap.test-snapd-user-service.svc2.service | MATCH "active"
tests.session -u test2 exec systemctl --user is-active snap.test-snapd-user-service.svc1.service | MATCH "active"
tests.session -u test2 exec systemctl --user is-active snap.test-snapd-user-service.svc2.service | MATCH "active"

0 comments on commit 2f78e1e

Please sign in to comment.