diff options
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/fsck.nix | 12 | ||||
-rw-r--r-- | nixos/tests/matrix/mjolnir.nix | 5 | ||||
-rw-r--r-- | nixos/tests/openldap.nix | 2 |
4 files changed, 17 insertions, 3 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e1a0812d480d..8784b39a059b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -236,6 +236,7 @@ in { freshrss-pgsql = handleTest ./freshrss-pgsql.nix {}; frr = handleTest ./frr.nix {}; fsck = handleTest ./fsck.nix {}; + fsck-systemd-stage-1 = handleTest ./fsck.nix { systemdStage1 = true; }; ft2-clone = handleTest ./ft2-clone.nix {}; mimir = handleTest ./mimir.nix {}; garage = handleTest ./garage {}; diff --git a/nixos/tests/fsck.nix b/nixos/tests/fsck.nix index 5b8b09f433a2..ccb664be080c 100644 --- a/nixos/tests/fsck.nix +++ b/nixos/tests/fsck.nix @@ -1,3 +1,9 @@ +{ system ? builtins.currentSystem +, config ? {} +, pkgs ? import ../.. { inherit system config; } +, systemdStage1 ? false +}: + import ./make-test-python.nix { name = "fsck"; @@ -11,13 +17,17 @@ import ./make-test-python.nix { autoFormat = true; }; }; + + boot.initrd.systemd.enable = systemdStage1; }; testScript = '' machine.wait_for_unit("default.target") with subtest("root fs is fsckd"): - machine.succeed("journalctl -b | grep 'fsck.ext4.*/dev/vda'") + machine.succeed("journalctl -b | grep '${if systemdStage1 + then "fsck.*vda.*clean" + else "fsck.ext4.*/dev/vda"}'") with subtest("mnt fs is fsckd"): machine.succeed("journalctl -b | grep 'fsck.*/dev/vdb.*clean'") diff --git a/nixos/tests/matrix/mjolnir.nix b/nixos/tests/matrix/mjolnir.nix index b1ac55d951ce..c88113cb260b 100644 --- a/nixos/tests/matrix/mjolnir.nix +++ b/nixos/tests/matrix/mjolnir.nix @@ -107,7 +107,10 @@ import ../make-test-python.nix ( client = { pkgs, ... }: { environment.systemPackages = [ (pkgs.writers.writePython3Bin "create_management_room_and_invite_mjolnir" - { libraries = [ pkgs.python3Packages.matrix-nio ]; } '' + { libraries = with pkgs.python3Packages; [ + matrix-nio + ] ++ matrix-nio.optional-dependencies.e2e; + } '' import asyncio from nio import ( diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix index 075bb5d1f640..47d6a91843f1 100644 --- a/nixos/tests/openldap.nix +++ b/nixos/tests/openldap.nix @@ -118,7 +118,7 @@ in { }; }; testScript = { nodes, ... }: let - specializations = "${nodes.machine.config.system.build.toplevel}/specialisation"; + specializations = "${nodes.machine.system.build.toplevel}/specialisation"; changeRootPw = '' dn: olcDatabase={1}mdb,cn=config changetype: modify |