summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuflosi <luflosi@luflosi.de>2023-04-04 20:12:51 +0200
committerLuflosi <luflosi@luflosi.de>2023-06-05 16:39:09 +0200
commit7573c269a899af49e88007e46154d9a263fac843 (patch)
treead32033b478eab06fd21d88794726baa64f20333
parenta2c62404a0842bf647607bcae827ea2f25e29d19 (diff)
downloadnixpkgs-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.nix2
-rw-r--r--nixos/tests/apfs.nix8
-rw-r--r--pkgs/os-specific/linux/apfs/default.nix2
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";