1import ./make-test-python.nix (
2 { lib, ... }:
3 {
4 name = "ntpd";
5
6 meta = {
7 maintainers = with lib.maintainers; [ pyrox0 ];
8 };
9
10 nodes.machine = {
11 services.ntp = {
12 enable = true;
13 };
14 };
15
16 testScript = ''
17 start_all()
18
19 machine.wait_for_unit('ntpd.service')
20 machine.wait_for_console_text('Listen normally on 10 eth*')
21 machine.succeed('systemctl is-active ntpd.service')
22 machine.succeed('ntpq -p')
23 # ntp user must be able to create drift files
24 machine.succeed('su -s /bin/sh -c "touch /var/lib/ntp/ntp.drift" ntp')
25 '';
26 }
27)