diff options
author | Luflosi <luflosi@luflosi.de> | 2023-04-04 20:12:51 +0200 |
---|---|---|
committer | Luflosi <luflosi@luflosi.de> | 2023-06-05 16:39:09 +0200 |
commit | 7573c269a899af49e88007e46154d9a263fac843 (patch) | |
tree | ad32033b478eab06fd21d88794726baa64f20333 | |
parent | a2c62404a0842bf647607bcae827ea2f25e29d19 (diff) | |
download | nixpkgs-7573c269a899af49e88007e46154d9a263fac843.tar nixpkgs-7573c269a899af49e88007e46154d9a263fac843.tar.gz nixpkgs-7573c269a899af49e88007e46154d9a263fac843.tar.bz2 nixpkgs-7573c269a899af49e88007e46154d9a263fac843.tar.lz nixpkgs-7573c269a899af49e88007e46154d9a263fac843.tar.xz nixpkgs-7573c269a899af49e88007e46154d9a263fac843.tar.zst nixpkgs-7573c269a899af49e88007e46154d9a263fac843.zip |
nixos/tests/apfs: clean up code
- Use `runTest` instead of `handleTest`, which simplifies the code a little - Use `lib.maintainers` instead of `pkgs.lib.maintainers` - Remove unused function argument `pkgs` - Change test name in the kernel module from `test` to `apfs`, since that seems to be a common pattern for the name
-rw-r--r-- | nixos/tests/all-tests.nix | 2 | ||||
-rw-r--r-- | nixos/tests/apfs.nix | 8 | ||||
-rw-r--r-- | pkgs/os-specific/linux/apfs/default.nix | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e597a26f31b..ba16cd6b883 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -108,7 +108,7 @@ in { alps = handleTest ./alps.nix {}; amazon-init-shell = handleTest ./amazon-init-shell.nix {}; apcupsd = handleTest ./apcupsd.nix {}; - apfs = handleTest ./apfs.nix {}; + apfs = runTest ./apfs.nix; apparmor = handleTest ./apparmor.nix {}; atd = handleTest ./atd.nix {}; atop = handleTest ./atop.nix {}; diff --git a/nixos/tests/apfs.nix b/nixos/tests/apfs.nix index 9fe689951c7..15ed5aa7f57 100644 --- a/nixos/tests/apfs.nix +++ b/nixos/tests/apfs.nix @@ -1,8 +1,8 @@ -import ./make-test-python.nix ({ pkgs, ... }: { +{ lib, ... }: { name = "apfs"; - meta.maintainers = with pkgs.lib.maintainers; [ Luflosi ]; + meta.maintainers = with lib.maintainers; [ Luflosi ]; - nodes.machine = { pkgs, ... }: { + nodes.machine = { virtualisation.emptyDiskImages = [ 1024 ]; boot.supportedFilesystems = [ "apfs" ]; @@ -62,4 +62,4 @@ import ./make-test-python.nix ({ pkgs, ... }: { "apfsck /dev/vdb", ) ''; -}) +} diff --git a/pkgs/os-specific/linux/apfs/default.nix b/pkgs/os-specific/linux/apfs/default.nix index 70c344903f5..590266fab34 100644 --- a/pkgs/os-specific/linux/apfs/default.nix +++ b/pkgs/os-specific/linux/apfs/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { "INSTALL_MOD_PATH=$(out)" ]; - passthru.tests.test = nixosTests.apfs; + passthru.tests.apfs = nixosTests.apfs; meta = with lib; { description = "APFS module for linux"; |