about summary refs log tree commit diff
path: root/nixos/tests/ntpd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/ntpd.nix')
-rw-r--r--nixos/tests/ntpd.nix25
1 files changed, 25 insertions, 0 deletions
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')
+    '';
+  }
+)