nixosTests.ergochat: Test configuration reloading

This commit is contained in:
dramforever 2026-03-01 15:35:52 +08:00
commit b00a03f81f

View file

@ -5,6 +5,7 @@ let
];
server = "ergochat";
ircPort = 6667;
altIrcPort = 16667;
channel = "nixos-cat";
iiDir = "/tmp/irc";
in
@ -22,6 +23,10 @@ in
This one does.
'';
};
specialisation.new.configuration = {
services.ergochat.settings.server.listeners.":${toString altIrcPort}" = null;
};
};
}
// lib.listToAttrs (
@ -101,5 +106,10 @@ in
# entry is executed by every client before advancing
# to the next one.
''
+ lib.concatStrings (reduce (lib.zipListsWith (cs: c: cs + c)) (map clientScript clients));
+ lib.concatStrings (reduce (lib.zipListsWith (cs: c: cs + c)) (map clientScript clients))
# Test server config reloading
+ ''
${server}.succeed("/run/current-system/specialisation/new/bin/switch-to-configuration test")
${server}.wait_for_open_port(${toString altIrcPort})
'';
}