summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/owncloud.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixos/tests/owncloud.nix b/nixos/tests/owncloud.nix
new file mode 100644
index 000000000000..0dcdea40b064
--- /dev/null
+++ b/nixos/tests/owncloud.nix
@@ -0,0 +1,39 @@
+import ./make-test.nix ({ pkgs, ... }:
+
+{
+  name = "owncloud";
+  nodes =
+    { web =
+        { config, pkgs, ... }:
+        {
+          services.postgresql.enable = true;
+          services.httpd = {
+            enable = true;
+            logPerVirtualHost = true;
+            adminAddr = "example@example.com";
+            virtualHosts = [
+              {
+                hostName = "owncloud";
+                extraSubservices =
+                  [
+                    {
+                      serviceType   = "owncloud";
+                      adminPassword = "secret";
+                      dbPassword    = "secret";
+                    }
+                  ];
+              }
+            ];
+          };
+        };
+    };
+
+  testScript = ''
+    startAll;
+
+    $web->waitForUnit("postgresql");
+    $web->waitForUnit("httpd");
+
+    $web->succeed("curl -L 127.0.0.1:80");
+  '';
+})