mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/sudo-rs: use runTest to run the VM test
This commit is contained in:
parent
4e17c9546f
commit
b1680bd19b
2 changed files with 122 additions and 125 deletions
|
@ -1051,7 +1051,7 @@ in {
|
|||
stub-ld = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./stub-ld.nix {};
|
||||
stunnel = handleTest ./stunnel.nix {};
|
||||
sudo = handleTest ./sudo.nix {};
|
||||
sudo-rs = handleTest ./sudo-rs.nix {};
|
||||
sudo-rs = runTest ./sudo-rs.nix;
|
||||
sunshine = handleTest ./sunshine.nix {};
|
||||
suricata = handleTest ./suricata.nix {};
|
||||
suwayomi-server = handleTest ./suwayomi-server.nix {};
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
# Some tests to ensure sudo is working properly.
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.lib) mkIf optionalString;
|
||||
password = "helloworld";
|
||||
in
|
||||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "sudo-rs";
|
||||
meta.maintainers = pkgs.sudo-rs.meta.maintainers;
|
||||
|
@ -134,7 +131,8 @@ import ./make-test-python.nix (
|
|||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
testScript = # python
|
||||
''
|
||||
with subtest("users in wheel group should have passwordless sudo"):
|
||||
machine.succeed('faketty -- su - test0 -c "sudo -u root true"')
|
||||
|
||||
|
@ -166,4 +164,3 @@ import ./make-test-python.nix (
|
|||
strict.fail('faketty -- su - noadmin -c "sudo --help"')
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue