about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2014-05-14 14:57:36 -0500
committerAustin Seipp <aseipp@pobox.com>2014-05-14 14:57:36 -0500
commit2558fa587bd1d71de5de089df1bbcff5b0254c03 (patch)
treead4a706a5d0b75fcc4cbf4c36e77fa49f8890d71 /nixos/tests
parentaaf7f570c16bbffcb8d556bfd41365e908554847 (diff)
parent25e0d51a6793a5773227bda92ae494b73c8df624 (diff)
downloadnixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.tar
nixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.tar.gz
nixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.tar.bz2
nixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.tar.lz
nixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.tar.xz
nixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.tar.zst
nixlib-2558fa587bd1d71de5de089df1bbcff5b0254c03.zip
Merge pull request #2629 from letac/master
Phabricator, a web application, snapshot of 2014-05-12
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/phabricator.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/nixos/tests/phabricator.nix b/nixos/tests/phabricator.nix
new file mode 100644
index 000000000000..8a8c6cb784cc
--- /dev/null
+++ b/nixos/tests/phabricator.nix
@@ -0,0 +1,66 @@
+import ./make-test.nix ({ pkgs, ... }: {
+
+  nodes = {
+    storage =
+      { config, pkgs, ... }:
+      { services.nfs.server.enable = true;
+        services.nfs.server.exports = ''
+          /repos 192.168.1.0/255.255.255.0(rw,no_root_squash)
+        '';
+        services.nfs.server.createMountPoints = true;
+      };
+
+    webserver =
+      { config, pkgs, ... }:
+      { fileSystems = pkgs.lib.mkVMOverride
+          [ { mountPoint = "/repos";
+              device = "storage:/repos";
+              fsType = "nfs";
+            }
+          ];
+        networking.firewall.enable = false;
+        networking.useDHCP = false;
+
+        services = {
+          httpd = {
+            enable = true;
+            adminAddr = "root@localhost";
+            virtualHosts = [{
+              hostName = "phabricator.local";
+              extraSubservices = [{serviceType = "phabricator";}];
+            }];
+          };
+
+          mysql = {
+            enable = true;
+            package = pkgs.mysql;
+          };
+        };
+
+        environment.systemPackages = [ pkgs.php ];
+      };
+
+    client =
+      { config, pkgs, ... }:
+      { imports = [ ./common/x11.nix ];
+        services.xserver.desktopManager.kde4.enable = true;
+      };
+  };
+
+  testScript =
+    ''
+      startAll;
+
+      $client->waitForX;
+
+      $webserver->waitForUnit("mysql");
+      $webserver->waitForUnit("httpd");
+      $webserver->execute("cd /nix/store; less >/repos/log1");
+
+      $client->sleep(30); # loading takes a long time
+      $client->execute("konqueror http://webserver/ &");
+      $client->sleep(90); # loading takes a long time
+
+      $client->screenshot("screen");
+    '';
+})