From b00a03f81f3f816f0ee449c3f47c0a3c780e2f46 Mon Sep 17 00:00:00 2001 From: dramforever Date: Sun, 1 Mar 2026 15:35:52 +0800 Subject: [PATCH] nixosTests.ergochat: Test configuration reloading --- nixos/tests/ergochat.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/tests/ergochat.nix b/nixos/tests/ergochat.nix index 69fce2fe5396..dac74451f0b9 100644 --- a/nixos/tests/ergochat.nix +++ b/nixos/tests/ergochat.nix @@ -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}) + ''; }