about summary refs log tree commit diff
path: root/nixos/tests/sympa.nix
diff options
context:
space:
mode:
authorMartin Milata <martin@martinmilata.cz>2019-07-06 20:56:30 +0200
committerMartin Milata <martin@martinmilata.cz>2020-02-07 22:54:27 +0100
commit097ab90850d968c90444f221841b2a7949cf216a (patch)
tree9350c724adc91ffb11d0160c644ffe0e33852efc /nixos/tests/sympa.nix
parente39d7fab273e62fbe9b2a506641361b3f056184a (diff)
nixos/sympa: init module
Diffstat (limited to 'nixos/tests/sympa.nix')
-rw-r--r--nixos/tests/sympa.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixos/tests/sympa.nix b/nixos/tests/sympa.nix
new file mode 100644
index 0000000000000..280691f7cb402
--- /dev/null
+++ b/nixos/tests/sympa.nix
@@ -0,0 +1,36 @@
+import ./make-test-python.nix ({ pkgs, lib, ... }: {
+  name = "sympa";
+  meta.maintainers = with lib.maintainers; [ mmilata ];
+
+  machine =
+    { ... }:
+    {
+      virtualisation.memorySize = 1024;
+
+      services.sympa = {
+        enable = true;
+        domains = {
+          "lists.example.org" = {
+            webHost = "localhost";
+          };
+        };
+        listMasters = [ "joe@example.org" ];
+        web.enable = true;
+        web.https = false;
+        database = {
+          type = "PostgreSQL";
+          createLocally = true;
+        };
+      };
+    };
+
+  testScript = ''
+    start_all()
+
+    machine.wait_for_unit("sympa.service")
+    machine.wait_for_unit("wwsympa.service")
+    assert "Mailing lists service" in machine.succeed(
+        "curl --insecure -L http://localhost/"
+    )
+  '';
+})