From 1dd1ca3b51ba88085d8117edb6b78717718e7607 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Tue, 21 Feb 2023 11:19:39 -0500 Subject: [PATCH] tests: add test names --- tests/bcachefs.nix | 1 + tests/boot-raid1.nix | 1 + tests/btrfs-subvolumes.nix | 1 + tests/cli.nix | 1 + tests/complex.nix | 1 + tests/gpt-bios-compat.nix | 1 + tests/hybrid-tmpfs-on-root.nix | 1 + tests/hybrid.nix | 1 + tests/lib.nix | 5 +++-- tests/luks-lvm.nix | 1 + tests/lvm-raid.nix | 1 + tests/mdadm.nix | 1 + tests/module.nix | 1 + tests/multi-device-no-deps.nix | 1 + tests/negative-size.nix | 1 + tests/simple-efi.nix | 1 + tests/swap.nix | 1 + tests/tmpfs.nix | 1 + tests/with-lib.nix | 1 + tests/zfs-over-legacy.nix | 1 + tests/zfs.nix | 1 + 21 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/bcachefs.nix b/tests/bcachefs.nix index a54f966..c5b073f 100644 --- a/tests/bcachefs.nix +++ b/tests/bcachefs.nix @@ -5,6 +5,7 @@ let linux-bcachefs = pkgs.callPackage ../linux-testing-bcachefs.nix { }; in makeDiskoTest { + name = "bcachefs"; disko-config = ../example/bcachefs.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/boot-raid1.nix b/tests/boot-raid1.nix index bea9adb..52988a1 100644 --- a/tests/boot-raid1.nix +++ b/tests/boot-raid1.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "boot-raid1"; disko-config = ../example/boot-raid1.nix; extraTestScript = '' machine.succeed("test -b /dev/md/boot"); diff --git a/tests/btrfs-subvolumes.nix b/tests/btrfs-subvolumes.nix index 1a62702..3418c14 100644 --- a/tests/btrfs-subvolumes.nix +++ b/tests/btrfs-subvolumes.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "btrfs-subvolumes"; disko-config = ../example/btrfs-subvolumes.nix; extraTestScript = '' machine.succeed("test -e /test"); diff --git a/tests/cli.nix b/tests/cli.nix index 0c2bf29..e30547a 100644 --- a/tests/cli.nix +++ b/tests/cli.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "cli"; disko-config = ../example/complex.nix; extraConfig = { fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this! diff --git a/tests/complex.nix b/tests/complex.nix index 6209338..6ed6e12 100644 --- a/tests/complex.nix +++ b/tests/complex.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "complex"; disko-config = ../example/complex.nix; extraConfig = { fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this! diff --git a/tests/gpt-bios-compat.nix b/tests/gpt-bios-compat.nix index e19c49a..e158dac 100644 --- a/tests/gpt-bios-compat.nix +++ b/tests/gpt-bios-compat.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "gpt-bios-compat"; disko-config = ../example/gpt-bios-compat.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/hybrid-tmpfs-on-root.nix b/tests/hybrid-tmpfs-on-root.nix index 0e6af1d..484d85a 100644 --- a/tests/hybrid-tmpfs-on-root.nix +++ b/tests/hybrid-tmpfs-on-root.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "hybrid-tmpfs-on-root"; disko-config = ../example/hybrid-tmpfs-on-root.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/hybrid.nix b/tests/hybrid.nix index 077308f..1a2314b 100644 --- a/tests/hybrid.nix +++ b/tests/hybrid.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "hybrid"; disko-config = ../example/hybrid.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/lib.nix b/tests/lib.nix index c3d8957..b2f2d2e 100644 --- a/tests/lib.nix +++ b/tests/lib.nix @@ -5,7 +5,8 @@ }: { makeDiskoTest = - { disko-config + { name + , disko-config , extraTestScript ? "" , bootCommands ? "" , extraConfig ? { } @@ -70,7 +71,7 @@ }).config.system.build.toplevel; in makeTest' { - name = "disko"; + name = "disko-${name}"; inherit enableOCR; nodes.machine = { config, pkgs, modulesPath, ... }: { diff --git a/tests/luks-lvm.nix b/tests/luks-lvm.nix index 4f35e5d..5f4aa39 100644 --- a/tests/luks-lvm.nix +++ b/tests/luks-lvm.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "luks-lvm"; disko-config = ../example/luks-lvm.nix; extraTestScript = '' machine.succeed("cryptsetup isLuks /dev/vda2"); diff --git a/tests/lvm-raid.nix b/tests/lvm-raid.nix index cc73e61..f6f42a2 100644 --- a/tests/lvm-raid.nix +++ b/tests/lvm-raid.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "lvm-raid"; disko-config = ../example/lvm-raid.nix; extraTestScript = '' machine.succeed("mountpoint /home"); diff --git a/tests/mdadm.nix b/tests/mdadm.nix index 2b4442a..b2cf96c 100644 --- a/tests/mdadm.nix +++ b/tests/mdadm.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "mdadm"; disko-config = ../example/mdadm.nix; extraTestScript = '' machine.succeed("test -b /dev/md/raid1"); diff --git a/tests/module.nix b/tests/module.nix index 2a6342f..9b142c7 100644 --- a/tests/module.nix +++ b/tests/module.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "module"; disko-config = ../example/complex.nix; extraConfig = { fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this! diff --git a/tests/multi-device-no-deps.nix b/tests/multi-device-no-deps.nix index ef1f7a8..22f36a1 100644 --- a/tests/multi-device-no-deps.nix +++ b/tests/multi-device-no-deps.nix @@ -3,6 +3,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "multi-device-no-deps"; disko-config = ../example/multi-device-no-deps.nix; testBoot = false; extraTestScript = '' diff --git a/tests/negative-size.nix b/tests/negative-size.nix index 224b00c..caf6f71 100644 --- a/tests/negative-size.nix +++ b/tests/negative-size.nix @@ -3,6 +3,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "negative-size"; disko-config = ../example/negative-size.nix; testBoot = false; extraTestScript = '' diff --git a/tests/simple-efi.nix b/tests/simple-efi.nix index 920920f..f1f8c22 100644 --- a/tests/simple-efi.nix +++ b/tests/simple-efi.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "simple-efi"; disko-config = ../example/simple-efi.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/swap.nix b/tests/swap.nix index 4861f8d..f13bba2 100644 --- a/tests/swap.nix +++ b/tests/swap.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "swap"; disko-config = ../example/swap.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/tmpfs.nix b/tests/tmpfs.nix index 10da055..e3de978 100644 --- a/tests/tmpfs.nix +++ b/tests/tmpfs.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "tmpfs"; disko-config = ../example/tmpfs.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/with-lib.nix b/tests/with-lib.nix index 18c422b..9ad1710 100644 --- a/tests/with-lib.nix +++ b/tests/with-lib.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "with-lib"; disko-config = ../example/with-lib.nix; extraTestScript = '' machine.succeed("mountpoint /"); diff --git a/tests/zfs-over-legacy.nix b/tests/zfs-over-legacy.nix index 09505e5..acf62fd 100644 --- a/tests/zfs-over-legacy.nix +++ b/tests/zfs-over-legacy.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "zfs-over-legacy"; disko-config = ../example/zfs-over-legacy.nix; extraTestScript = '' machine.succeed("test -e /zfs_fs"); diff --git a/tests/zfs.nix b/tests/zfs.nix index ce60789..75268ef 100644 --- a/tests/zfs.nix +++ b/tests/zfs.nix @@ -2,6 +2,7 @@ , makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest }: makeDiskoTest { + name = "zfs"; disko-config = ../example/zfs.nix; extraConfig = { fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!