From 6c73e41ae3d004402b3c29266124c35d0e7a77bb Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Sat, 3 May 2025 12:03:53 +0000 Subject: [PATCH] nixos/ntpd-rs: tests: Verify that server/pool has been written to ntpd-rs.toml file --- nixos/tests/ntpd-rs.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/tests/ntpd-rs.nix b/nixos/tests/ntpd-rs.nix index 1a85e75916e6..9459a9f4ac51 100644 --- a/nixos/tests/ntpd-rs.nix +++ b/nixos/tests/ntpd-rs.nix @@ -69,6 +69,9 @@ import ./make-test-python.nix ( client.succeed("ntp-ctl status | grep server:123") server.succeed("ntp-ctl status | grep '\[::\]:123'") + + client.succeed("grep '^mode = \"server\"' $(systemctl status ntpd-rs | grep -oE '/nix/store[^ ]*ntpd-rs.toml')") + server.succeed("grep '^mode = \"pool\"' $(systemctl status ntpd-rs | grep -oE '/nix/store[^ ]*ntpd-rs.toml')") ''; } )