From 25e0d51a6793a5773227bda92ae494b73c8df624 Mon Sep 17 00:00:00 2001 From: Strahinja Popovic Date: Mon, 12 May 2014 19:59:40 +0200 Subject: Phabricator, a web application, snapshot of 2014-05-12 --- nixos/tests/phabricator.nix | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 nixos/tests/phabricator.nix (limited to 'nixos/tests') 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"); + ''; +}) -- cgit 1.4.1