mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
systemd-initrd: migrate test to runTest and add comment for syntax highlighting of test script
This commit is contained in:
parent
01b589a7f8
commit
ed70f0089d
2 changed files with 14 additions and 15 deletions
|
@ -1296,7 +1296,7 @@ in
|
|||
systemd-initrd-luks-unl0kr = handleTest ./systemd-initrd-luks-unl0kr.nix { };
|
||||
systemd-initrd-modprobe = handleTest ./systemd-initrd-modprobe.nix { };
|
||||
systemd-initrd-shutdown = handleTest ./systemd-shutdown.nix { systemdStage1 = true; };
|
||||
systemd-initrd-simple = handleTest ./systemd-initrd-simple.nix { };
|
||||
systemd-initrd-simple = runTest ./systemd-initrd-simple.nix;
|
||||
systemd-initrd-swraid = handleTest ./systemd-initrd-swraid.nix { };
|
||||
systemd-initrd-vconsole = handleTest ./systemd-initrd-vconsole.nix { };
|
||||
systemd-initrd-networkd = handleTest ./systemd-initrd-networkd.nix { };
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "systemd-initrd-simple";
|
||||
{
|
||||
name = "systemd-initrd-simple";
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
testing.initrdBackdoor = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
virtualisation.fileSystems."/".autoResize = true;
|
||||
};
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
testing.initrdBackdoor = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
virtualisation.fileSystems."/".autoResize = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
testScript =
|
||||
# python
|
||||
''
|
||||
import subprocess
|
||||
|
||||
with subtest("testing initrd backdoor"):
|
||||
|
@ -54,5 +54,4 @@ import ./make-test-python.nix (
|
|||
with subtest("no warnings from systemd about write permissions"):
|
||||
machine.fail("journalctl -b 0 | grep 'is marked world-writable, which is a security risk as it is executed with privileges'")
|
||||
'';
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue