mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 05:23:28 +01:00
tests: refactor to not use args and to use gpt type
This commit is contained in:
1 parent
c77e66cea1
commit
04452cfd2b
19 files changed
+221
-335
No files matched your search
+7
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user