2014-05-12 19:59:40 +02:00
|
|
|
import ./make-test.nix ({ pkgs, ... }: {
|
2014-06-28 16:04:49 +02:00
|
|
|
name = "phabricator";
|
2015-07-12 12:09:40 +02:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2019-02-22 16:14:13 +01:00
|
|
|
maintainers = [ ];
|
2015-07-12 12:09:40 +02:00
|
|
|
};
|
2014-05-12 19:59:40 +02:00
|
|
|
|
|
|
|
nodes = {
|
|
|
|
storage =
|
2018-07-20 22:56:59 +02:00
|
|
|
{ ... }:
|
2014-05-12 19:59:40 +02:00
|
|
|
{ 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 =
|
2018-07-20 22:56:59 +02:00
|
|
|
{ pkgs, ... }:
|
2014-05-12 19:59:40 +02:00
|
|
|
{ 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";}];
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
2014-07-17 12:51:17 +02:00
|
|
|
phd = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2014-05-12 19:59:40 +02:00
|
|
|
mysql = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.mysql;
|
2014-07-17 12:51:17 +02:00
|
|
|
extraOptions = ''
|
|
|
|
sql_mode=STRICT_ALL_TABLES
|
|
|
|
'';
|
2014-05-12 19:59:40 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.php ];
|
|
|
|
};
|
|
|
|
|
|
|
|
client =
|
2018-07-20 22:56:59 +02:00
|
|
|
{ ... }:
|
2014-05-12 19:59:40 +02:00
|
|
|
{ imports = [ ./common/x11.nix ];
|
2017-03-03 14:26:17 +01:00
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
2014-05-12 19:59:40 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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");
|
|
|
|
'';
|
|
|
|
})
|