mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixosTests: handleTest -> runTest, batch 1
Reference: https://github.com/NixOS/nixpkgs/issues/386873
This commit is contained in:
parent
131462b962
commit
f34483be5e
538 changed files with 35525 additions and 36600 deletions
|
@ -1,42 +1,40 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "systemd-user-tmpfiles-rules";
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "systemd-user-tmpfiles-rules";
|
||||
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ schnusch ];
|
||||
};
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ schnusch ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
users.users = {
|
||||
alice.isNormalUser = true;
|
||||
bob.isNormalUser = true;
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles = {
|
||||
rules = [
|
||||
"d %h/user_tmpfiles_created"
|
||||
];
|
||||
users.alice.rules = [
|
||||
"d %h/only_alice"
|
||||
];
|
||||
};
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
users.users = {
|
||||
alice.isNormalUser = true;
|
||||
bob.isNormalUser = true;
|
||||
};
|
||||
|
||||
testScript =
|
||||
{ ... }:
|
||||
''
|
||||
machine.succeed("loginctl enable-linger alice bob")
|
||||
systemd.user.tmpfiles = {
|
||||
rules = [
|
||||
"d %h/user_tmpfiles_created"
|
||||
];
|
||||
users.alice.rules = [
|
||||
"d %h/only_alice"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
machine.wait_until_succeeds("systemctl --user --machine=alice@ is-active systemd-tmpfiles-setup.service")
|
||||
machine.succeed("[ -d ~alice/user_tmpfiles_created ]")
|
||||
machine.succeed("[ -d ~alice/only_alice ]")
|
||||
testScript =
|
||||
{ ... }:
|
||||
''
|
||||
machine.succeed("loginctl enable-linger alice bob")
|
||||
|
||||
machine.wait_until_succeeds("systemctl --user --machine=bob@ is-active systemd-tmpfiles-setup.service")
|
||||
machine.succeed("[ -d ~bob/user_tmpfiles_created ]")
|
||||
machine.succeed("[ ! -e ~bob/only_alice ]")
|
||||
'';
|
||||
}
|
||||
)
|
||||
machine.wait_until_succeeds("systemctl --user --machine=alice@ is-active systemd-tmpfiles-setup.service")
|
||||
machine.succeed("[ -d ~alice/user_tmpfiles_created ]")
|
||||
machine.succeed("[ -d ~alice/only_alice ]")
|
||||
|
||||
machine.wait_until_succeeds("systemctl --user --machine=bob@ is-active systemd-tmpfiles-setup.service")
|
||||
machine.succeed("[ -d ~bob/user_tmpfiles_created ]")
|
||||
machine.succeed("[ ! -e ~bob/only_alice ]")
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue