mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
Merge pull request #33418 from Ma27/test-driver/mention-changes-in-manual
test-driver: mention `$user` argument in the NixOS manual and the Impala release notes
This commit is contained in:
commit
6249d32486
@ -272,8 +272,37 @@ startAll;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><methodname>systemctl</methodname></term>
|
||||
<listitem>
|
||||
<para>Runs <literal>systemctl</literal> commands with optional support for
|
||||
<literal>systemctl --user</literal></para>
|
||||
<para>
|
||||
<programlisting>
|
||||
$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`
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To test user units declared by <literal>systemd.user.services</literal> the optional <literal>$user</literal>
|
||||
argument can be used:
|
||||
|
||||
<programlisting>
|
||||
$machine->start;
|
||||
$machine->waitForX;
|
||||
$machine->waitForUnit("xautolock.service", "x-session-user");
|
||||
</programlisting>
|
||||
|
||||
This applies to <literal>systemctl</literal>, <literal>getUnitInfo</literal>,
|
||||
<literal>waitForUnit</literal>, <literal>startJob</literal>
|
||||
and <literal>stopJob</literal>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
@ -234,6 +234,13 @@ following incompatible changes:</para>
|
||||
to your <literal>configuration.nix</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The NixOS test driver supports user services declared by <literal>systemd.user.services</literal>.
|
||||
The methods <literal>waitForUnit</literal>, <literal>getUnitInfo</literal>, <literal>startJob</literal>
|
||||
and <literal>stopJob</literal> provide an optional <literal>$user</literal> argument for that purpose.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user