nixos/tests/ntpd: init

This commit is contained in:
Pyrox 2024-10-19 14:26:27 -04:00
parent 4e632e9c3f
commit 19c40f0e11
No known key found for this signature in database
GPG Key ID: 8CDF3F7CAA53A0F5
2 changed files with 26 additions and 0 deletions

View File

@ -714,6 +714,7 @@ in {
nsd = handleTest ./nsd.nix {}; nsd = handleTest ./nsd.nix {};
ntfy-sh = handleTest ./ntfy-sh.nix {}; ntfy-sh = handleTest ./ntfy-sh.nix {};
ntfy-sh-migration = handleTest ./ntfy-sh-migration.nix {}; ntfy-sh-migration = handleTest ./ntfy-sh-migration.nix {};
ntpd = handleTest ./ntpd.nix {};
ntpd-rs = handleTest ./ntpd-rs.nix {}; ntpd-rs = handleTest ./ntpd-rs.nix {};
nvidia-container-toolkit = runTest ./nvidia-container-toolkit.nix; nvidia-container-toolkit = runTest ./nvidia-container-toolkit.nix;
nvmetcfg = handleTest ./nvmetcfg.nix {}; nvmetcfg = handleTest ./nvmetcfg.nix {};

25
nixos/tests/ntpd.nix Normal file
View File

@ -0,0 +1,25 @@
import ./make-test-python.nix (
{ lib, ... }:
{
name = "ntpd";
meta = {
maintainers = with lib.maintainers; [ pyrox0 ];
};
nodes.machine = {
services.ntp = {
enable = true;
};
};
testScript = ''
start_all()
machine.wait_for_unit('ntpd.service')
machine.wait_for_console_text('Listen normally on 10 eth*')
machine.succeed('systemctl is-active ntpd.service')
machine.succeed('ntpq -p')
'';
}
)