mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
24 lines
829 B
Nix
24 lines
829 B
Nix
{ pkgs ? import <nixpkgs> { }
|
|
, diskoLib ? pkgs.callPackage ../lib { }
|
|
}:
|
|
diskoLib.testLib.makeDiskoTest {
|
|
inherit pkgs;
|
|
name = "zfs-with-vdevs";
|
|
disko-config = ../example/zfs-with-vdevs.nix;
|
|
extraInstallerConfig.networking.hostId = "8425e349";
|
|
extraSystemConfig = {
|
|
networking.hostId = "8425e349";
|
|
};
|
|
extraTestScript = ''
|
|
def assert_property(ds, property, expected_value):
|
|
out = machine.succeed(f"zfs get -H {property} {ds} -o value").rstrip()
|
|
assert (
|
|
out == expected_value
|
|
), f"Expected {property}={expected_value} on {ds}, got: {out}"
|
|
|
|
assert_property("zroot", "compression", "zstd")
|
|
assert_property("zroot/zfs_fs", "com.sun:auto-snapshot", "true")
|
|
assert_property("zroot/zfs_fs", "compression", "zstd")
|
|
machine.succeed("mountpoint /zfs_fs");
|
|
'';
|
|
}
|