1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-17 02:14:36 +00:00
nixpkgs/nixos/tests/wordpress.nix
Bas van Dijk 308c09d41f wordpress: security upgrade: 4.7.2 -> 4.7.3 & other improvements (#23837)
* Moved the wordpress sources derivation to the attribute pkgs.wordpress. This
  makes it easier to override.

* Also introduce the `package` option for the wordpress virtual host config which
  defaults to pkgs.wordpress.

* Also fixed the test in nixos/tests/wordpress.nix.
2017-03-14 16:11:51 +01:00

57 lines
1.2 KiB
Nix

import ./make-test.nix ({ pkgs, ... }:
{
name = "wordpress";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ grahamc ]; # under duress!
};
nodes =
{ web =
{ config, pkgs, ... }:
{
services.mysql = {
enable = true;
package = pkgs.mysql;
};
services.httpd = {
enable = true;
logPerVirtualHost = true;
adminAddr="js@lastlog.de";
extraModules = [
{ name = "php7"; path = "${pkgs.php}/modules/libphp7.so"; }
];
virtualHosts = [
{
hostName = "wordpress";
extraSubservices =
[
{
serviceType = "wordpress";
dbPassword = "wordpress";
wordpressUploads = "/data/uploads";
languages = [ "de_DE" "en_GB" ];
}
];
}
];
};
};
};
testScript =
{ nodes, ... }:
''
startAll;
$web->waitForUnit("mysql");
$web->waitForUnit("httpd");
$web->succeed("curl -L 127.0.0.1:80 | grep 'Welcome to the famous'");
'';
})