Unverified Commit 7573c269 authored by Luflosi's avatar Luflosi
Browse files

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
parent a2c62404
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {};
+4 −4
Original line number Diff line number Diff line
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",
      )
  '';
})
}
+1 −1
Original line number Diff line number Diff line
@@ -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";