diff options
author | Graham Christensen <graham@grahamc.com> | 2016-09-26 18:06:56 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2016-09-26 19:36:07 -0400 |
commit | 4671806183e05e839fa4fe9459079ad527e52905 (patch) | |
tree | 8259bd57c2cc42e7493278e2cd7c68778c8b3408 /nixos/tests/wordpress.nix | |
parent | d4c66e2f46b248d55313105f09d25e5a1d304337 (diff) | |
download | nixlib-4671806183e05e839fa4fe9459079ad527e52905.tar nixlib-4671806183e05e839fa4fe9459079ad527e52905.tar.gz nixlib-4671806183e05e839fa4fe9459079ad527e52905.tar.bz2 nixlib-4671806183e05e839fa4fe9459079ad527e52905.tar.lz nixlib-4671806183e05e839fa4fe9459079ad527e52905.tar.xz nixlib-4671806183e05e839fa4fe9459079ad527e52905.tar.zst nixlib-4671806183e05e839fa4fe9459079ad527e52905.zip |
wordpress: 4.3.1 -> 4.6.1 + add a test
Diffstat (limited to 'nixos/tests/wordpress.nix')
-rw-r--r-- | nixos/tests/wordpress.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/nixos/tests/wordpress.nix b/nixos/tests/wordpress.nix new file mode 100644 index 000000000000..afee1f7f6dd4 --- /dev/null +++ b/nixos/tests/wordpress.nix @@ -0,0 +1,60 @@ +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; + services.mysql.package = pkgs.mysql; + services.mysql.initialScript = pkgs.writeText "start.sql" '' + CREATE DATABASE wordpress; + CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; + GRANT ALL on wordpress.* TO 'wordpress'@'localhost'; + ''; + + 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'"); + + + ''; + +}) |