mirror of
https://github.com/nix-community/disko.git
synced 2026-12-03 06:23:28 +01:00
Merge pull request #200 from phaer/zfs-hooks-test
This commit is contained in:
2 files changed
+7
-3
No files matched your search
@@ -64,6 +64,7 @@
|
|||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
};
|
};
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
postCreateHook = "zfs snapshot zroot@blank";
|
||||||
|
|
||||||
datasets = {
|
datasets = {
|
||||||
zfs_fs = {
|
zfs_fs = {
|
||||||
@@ -98,6 +99,9 @@
|
|||||||
keyformat = "passphrase";
|
keyformat = "passphrase";
|
||||||
keylocation = "file:///tmp/secret.key";
|
keylocation = "file:///tmp/secret.key";
|
||||||
};
|
};
|
||||||
|
postCreateHook = ''
|
||||||
|
zfs set keylocation="prompt" "zroot/$name";
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
"encrypted/test" = {
|
"encrypted/test" = {
|
||||||
zfs_type = "filesystem";
|
zfs_type = "filesystem";
|
||||||
|
|||||||
+3
-3
@@ -8,9 +8,6 @@ makeDiskoTest {
|
|||||||
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
|
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
|
||||||
boot.zfs.requestEncryptionCredentials = true;
|
boot.zfs.requestEncryptionCredentials = true;
|
||||||
};
|
};
|
||||||
postDisko = ''
|
|
||||||
machine.succeed("zfs set keylocation=prompt zroot/encrypted")
|
|
||||||
'';
|
|
||||||
enableOCR = true;
|
enableOCR = true;
|
||||||
bootCommands = ''
|
bootCommands = ''
|
||||||
machine.wait_for_text("passphrase for")
|
machine.wait_for_text("passphrase for")
|
||||||
@@ -32,6 +29,9 @@ makeDiskoTest {
|
|||||||
assert_property("zroot/zfs_testvolume", "volsize", "10M")
|
assert_property("zroot/zfs_testvolume", "volsize", "10M")
|
||||||
assert_property("zroot/zfs_unmounted_fs", "mountpoint", "none")
|
assert_property("zroot/zfs_unmounted_fs", "mountpoint", "none")
|
||||||
|
|
||||||
|
assert_property("zroot/encrypted", "keylocation", "prompt")
|
||||||
|
machine.succeed("zfs get name zroot@blank")
|
||||||
|
|
||||||
machine.succeed("mountpoint /zfs_fs");
|
machine.succeed("mountpoint /zfs_fs");
|
||||||
machine.succeed("mountpoint /zfs_legacy_fs");
|
machine.succeed("mountpoint /zfs_legacy_fs");
|
||||||
machine.succeed("mountpoint /ext4onzfs");
|
machine.succeed("mountpoint /ext4onzfs");
|
||||||
|
|||||||
Reference in new issue
Block a user