about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2018-10-11 10:09:29 +0200
committerRobin Gloster <mail@glob.in>2018-11-28 18:52:10 +0100
commit9ace7f640996bb3e95f8233a74ef980af3a35559 (patch)
tree7b5f850422a484f1ceaff7eb6d1065530b085b53 /nixos/tests
parent2f8073bd92a8289d52c19e574ea3db96911d9e82 (diff)
roundcube: clean-up and add test
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/roundcube.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/tests/roundcube.nix b/nixos/tests/roundcube.nix
new file mode 100644
index 0000000000000..faa5f3fa0df0f
--- /dev/null
+++ b/nixos/tests/roundcube.nix
@@ -0,0 +1,28 @@
+import ./make-test.nix ({ pkgs, ...} : {
+  name = "roundcube";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ globin ];
+  };
+
+  nodes = {
+    roundcube = { config, pkgs, ... }: {
+      services.roundcube = {
+        enable = true;
+        hostName = "roundcube";
+        nginx.enable = true;
+        database.password = "notproduction";
+      };
+      services.nginx.virtualHosts.roundcube = {
+        forceSSL = false;
+        enableACME = false;
+      };
+    };
+  };
+
+  testScript = ''
+    $roundcube->start;
+    $roundcube->waitForUnit("postgresql.service");
+    $roundcube->waitForUnit("phpfpm-roundcube.service");
+    $roundcube->succeed("curl -sSfL http://roundcube/");
+  '';
+})