summaryrefslogtreecommitdiffstats
path: root/nixos/tests/installer.nix
diff options
context:
space:
mode:
authorVenkateswara Rao Mandela <venkat.mandela@gmail.com>2019-03-07 15:00:11 +0530
committerVenkateswara Rao Mandela <venkat.mandela@gmail.com>2019-07-11 17:38:25 +0530
commitc400ab55d692d862a938b0c9d02fdc1cd402c6ff (patch)
tree96a9296395c06b26727948022cf1651a0ab51cbb /nixos/tests/installer.nix
parent7f363b034e3db9d08969c261ef2044c5948c94a0 (diff)
nixos/tests: installer: restructure simple test data
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r--nixos/tests/installer.nix32
1 files changed, 17 insertions, 15 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 07659b60b3b8..2db9d283f2bd 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -304,6 +304,22 @@ let
'';
};
+ # The (almost) simplest partitioning scheme: a swap partition and
+ # one big filesystem partition.
+ simple-test-config = { createPartitions =
+ ''
+ $machine->succeed(
+ "flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ . " mkpart primary linux-swap 1M 1024M"
+ . " mkpart primary ext2 1024M -1s",
+ "udevadm settle",
+ "mkswap /dev/vda1 -L swap",
+ "swapon -L swap",
+ "mkfs.ext3 -L nixos /dev/vda2",
+ "mount LABEL=nixos /mnt",
+ );
+ '';
+ };
in {
@@ -312,21 +328,7 @@ in {
# The (almost) simplest partitioning scheme: a swap partition and
# one big filesystem partition.
- simple = makeInstallerTest "simple"
- { createPartitions =
- ''
- $machine->succeed(
- "flock /dev/vda parted --script /dev/vda -- mklabel msdos"
- . " mkpart primary linux-swap 1M 1024M"
- . " mkpart primary ext2 1024M -1s",
- "udevadm settle",
- "mkswap /dev/vda1 -L swap",
- "swapon -L swap",
- "mkfs.ext3 -L nixos /dev/vda2",
- "mount LABEL=nixos /mnt",
- );
- '';
- };
+ simple = makeInstallerTest "simple" simple-test-config;
# Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem
simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot"