diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8ddcc779ea90..f153f9f8e0f0 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -714,6 +714,7 @@ in { nsd = handleTest ./nsd.nix {}; ntfy-sh = handleTest ./ntfy-sh.nix {}; ntfy-sh-migration = handleTest ./ntfy-sh-migration.nix {}; + ntpd = handleTest ./ntpd.nix {}; ntpd-rs = handleTest ./ntpd-rs.nix {}; nvidia-container-toolkit = runTest ./nvidia-container-toolkit.nix; nvmetcfg = handleTest ./nvmetcfg.nix {}; diff --git a/nixos/tests/ntpd.nix b/nixos/tests/ntpd.nix new file mode 100644 index 000000000000..1864044b64d4 --- /dev/null +++ b/nixos/tests/ntpd.nix @@ -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') + ''; + } +)