mirror of
https://github.com/nix-community/disko.git
synced 2026-01-15 02:38:48 +01:00
commit
037be88911
4 changed files with 13 additions and 5 deletions
|
|
@ -93,8 +93,6 @@
|
|||
cache = [ "cache" ];
|
||||
};
|
||||
};
|
||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
||||
options.cachefile = "none";
|
||||
|
||||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ let
|
|||
tsp-config = tsp-generator.config testConfigBooted;
|
||||
num-disks = builtins.length (lib.attrNames testConfigBooted.disko.devices.disk);
|
||||
|
||||
installed-system = { ... }: {
|
||||
installed-system = { config, ... }: {
|
||||
imports = [
|
||||
(lib.optionalAttrs (testMode == "direct") tsp-config)
|
||||
(lib.optionalAttrs (testMode == "module") {
|
||||
|
|
@ -101,7 +101,8 @@ let
|
|||
# config for tests to make them run faster or work at all
|
||||
documentation.enable = false;
|
||||
hardware.enableAllFirmware = lib.mkForce false;
|
||||
boot.initrd.preDeviceCommands = ''
|
||||
# FIXME: we don't have an systemd in stage-1 equialvent for this
|
||||
boot.initrd.preDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) ''
|
||||
echo -n 'secretsecret' > /tmp/secret.key
|
||||
'';
|
||||
boot.consoleLogLevel = lib.mkForce 100;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ in
|
|||
};
|
||||
cache = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = null;
|
||||
default = [];
|
||||
description = ''
|
||||
A dedicated zfs cache device (L2ARC). See
|
||||
https://openzfs.github.io/openzfs-docs/man/master/7/zpoolconcepts.7.html#Cache_Devices
|
||||
|
|
|
|||
|
|
@ -8,6 +8,15 @@ diskoLib.testLib.makeDiskoTest {
|
|||
extraInstallerConfig.networking.hostId = "8425e349";
|
||||
extraSystemConfig = {
|
||||
networking.hostId = "8425e349";
|
||||
# It looks like the 60s of NixOS is sometimes not enough for our virtio-based zpool.
|
||||
# This fixes the flakeiness of the test.
|
||||
boot.initrd.postResumeCommands = ''
|
||||
for i in $(seq 1 120); do
|
||||
if zpool list | grep -q zroot || zpool import -N zroot; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
'';
|
||||
};
|
||||
extraTestScript = ''
|
||||
def assert_property(ds, property, expected_value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue