3 ipAddr = "192.168.42.42";
5 import ./make-test-python.nix ({ lib, pkgs, ... }: {
7 meta.maintainers = with lib.maintainers; [ bjornfor ];
16 # Configure NISIP so that the only way apcaccess can work is to read
21 networking.interfaces.eth1 = {
30 # Check that the service starts, that the CLI (apcaccess) works and that it
31 # uses the config (ipAddr) defined in the service config.
34 machine.wait_for_unit("apcupsd.service")
35 machine.wait_for_open_port(3551, "${ipAddr}")
36 res = machine.succeed("apcaccess")
37 expect_line="MBATTCHG : 42 Percent"
38 assert "MBATTCHG : 42 Percent" in res, f"expected apcaccess output to contain '{expect_line}' but got '{res}'"