about summary refs log tree commit diff
path: root/nixos/tests/artalk.nix
diff options
context:
space:
mode:
authorMoraxyc <i@qaq.li>2024-05-09 14:41:39 +0800
committerMoraxyc <i@qaq.li>2024-05-18 02:15:33 +0800
commitda28a5ff2a83b8da13a8e54486781ff72f161d4c (patch)
tree5a11ed691498d9e30d55a02610b96d5b4a9e6c97 /nixos/tests/artalk.nix
parent4016009137056faa15bbc0c5604d750056a7d40a (diff)
nixos/artalk: init module
Diffstat (limited to 'nixos/tests/artalk.nix')
-rw-r--r--nixos/tests/artalk.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/tests/artalk.nix b/nixos/tests/artalk.nix
new file mode 100644
index 0000000000000..1338e5cd380c6
--- /dev/null
+++ b/nixos/tests/artalk.nix
@@ -0,0 +1,28 @@
+import ./make-test-python.nix (
+  { lib, pkgs, ... }:
+  {
+
+    name = "artalk";
+
+    meta = {
+      maintainers = with lib.maintainers; [ moraxyc ];
+    };
+
+    nodes.machine =
+      { pkgs, ... }:
+      {
+        environment.systemPackages = [ pkgs.curl ];
+        services.artalk = {
+          enable = true;
+        };
+      };
+
+    testScript = ''
+      machine.wait_for_unit("artalk.service")
+
+      machine.wait_for_open_port(23366)
+
+      machine.succeed("curl --fail --max-time 10 http://127.0.0.1:23366/")
+    '';
+  }
+)