tests: refactor to not use args and to use gpt type

This commit is contained in:
lassulus authored and mergify[bot] committed 2023-07-19 19:07:40 +00:00
1 parent c77e66cea1
commit 04452cfd2b
19 files changed
+221 -335

No files matched your search

+7 -2
View File
@@ -52,10 +52,15 @@ let
};
devices = [ "/dev/vda" "/dev/vdb" "/dev/vdc" "/dev/vdd" "/dev/vde" "/dev/vdf"];
# for installation we skip /dev/vda because it is the test runner disk
testConfigInstall = testlib.prepareDiskoConfig (import disko-config { inherit lib; }) (lib.tail devices);
importedDiskoConfig = import disko-config;
diskoConfigWithArgs = if builtins.isFunction importedDiskoConfig then
importedDiskoConfig { inherit lib; }
else
importedDiskoConfig;
testConfigInstall = testlib.prepareDiskoConfig diskoConfigWithArgs (lib.tail devices);
# we need to shift the disks by one because the first disk is the /dev/vda of the test runner
# so /dev/vdb becomes /dev/vda etc.
testConfigBooted = testlib.prepareDiskoConfig (import disko-config { inherit lib; }) devices;
testConfigBooted = testlib.prepareDiskoConfig diskoConfigWithArgs devices;
tsp-generator = pkgs.callPackage ../. { checked = true; };
tsp-create = (tsp-generator.createScript testConfigInstall) pkgs;