mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
tests: Add hydraJobs.tests.functional_*
This commit is contained in:
parent
dc720f89f2
commit
439022c5ac
13 changed files with 273 additions and 28 deletions
18
tests/nixos/functional/as-trusted-user.nix
Normal file
18
tests/nixos/functional/as-trusted-user.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
name = "functional-tests-on-nixos_trusted-user";
|
||||
|
||||
imports = [ ./common.nix ];
|
||||
|
||||
nodes.machine = {
|
||||
users.users.alice = { isNormalUser = true; };
|
||||
nix.settings.trusted-users = [ "alice" ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("""
|
||||
export TEST_TRUSTED_USER=1
|
||||
su --login --command "run-test-suite" alice >&2
|
||||
""")
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue