From e18b0b6033eb17c1aec48d931900f5debae9f4ef Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 4 Jan 2018 12:57:15 +0100 Subject: [PATCH] test-driver: mention `$user` argument in the NixOS manual and the Impala release notes --- .../development/writing-nixos-tests.xml | 29 +++++++++++++++++++ nixos/doc/manual/release-notes/rl-1803.xml | 7 +++++ 2 files changed, 36 insertions(+) diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml index 7b25a39e83b8..a8f6aa00858e 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.xml +++ b/nixos/doc/manual/development/writing-nixos-tests.xml @@ -272,8 +272,37 @@ startAll; + + systemctl + + Runs systemctl commands with optional support for + systemctl --user + + + $machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager` + $machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager` + + + + + + + To test user units declared by systemd.user.services the optional $user + argument can be used: + + + $machine->start; + $machine->waitForX; + $machine->waitForUnit("xautolock.service", "x-session-user"); + + + This applies to systemctl, getUnitInfo, + waitForUnit, startJob + and stopJob. + + diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index c8549e7c4adc..12ff2e39a1bf 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -234,6 +234,13 @@ following incompatible changes: to your configuration.nix. + + + The NixOS test driver supports user services declared by systemd.user.services. + The methods waitForUnit, getUnitInfo, startJob + and stopJob provide an optional $user argument for that purpose. + +