diff options
Diffstat (limited to 'nixos/tests/fancontrol.nix')
-rw-r--r-- | nixos/tests/fancontrol.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/fancontrol.nix b/nixos/tests/fancontrol.nix new file mode 100644 index 00000000000..83ddbb54c5b --- /dev/null +++ b/nixos/tests/fancontrol.nix @@ -0,0 +1,25 @@ +import ./make-test.nix ({ pkgs, ... } : { + name = "fancontrol"; + + machine = + { ... }: + { hardware.fancontrol.enable = true; + hardware.fancontrol.config = '' + INTERVAL=42 + DEVPATH=hwmon1=devices/platform/dummy + DEVNAME=hwmon1=dummy + FCTEMPS=hwmon1/device/pwm1=hwmon1/device/temp1_input + FCFANS=hwmon1/device/pwm1=hwmon1/device/fan1_input + MINTEMP=hwmon1/device/pwm1=25 + MAXTEMP=hwmon1/device/pwm1=65 + MINSTART=hwmon1/device/pwm1=150 + MINSTOP=hwmon1/device/pwm1=0 + ''; + }; + + # This configuration cannot be valid for the test VM, so it's expected to get an 'outdated' error. + testScript = '' + $machine->waitForUnit("fancontrol.service"); + $machine->waitUntilSucceeds("journalctl -eu fancontrol | grep 'Configuration appears to be outdated'"); + ''; +}) |