diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-03-04 16:06:37 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-03-04 16:06:37 +0100 |
commit | 5e5f482f32ea399128893a359fec1a451f62b443 (patch) | |
tree | ec3f7bb01dbb7f7be59e3969f1e3a44a30501fd3 /nixos | |
parent | 70ac808b39cecd4bcb67736d3befebc53ae9ca2a (diff) |
nixos/tests/php: add apcu to php to actually test whether extensions are properly loaded
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/php/default.nix | 14 | ||||
-rw-r--r-- | nixos/tests/php/fpm.nix | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/nixos/tests/php/default.nix b/nixos/tests/php/default.nix index 6ecaed246046..cf78c9db53b7 100644 --- a/nixos/tests/php/default.nix +++ b/nixos/tests/php/default.nix @@ -2,8 +2,14 @@ , config ? {} , pkgs ? import ../../.. { inherit system config; } , php ? pkgs.php -}: { - fpm = import ./fpm.nix { inherit system pkgs php; }; - httpd = import ./httpd.nix { inherit system pkgs php; }; - pcre = import ./pcre.nix { inherit system pkgs php; }; +}: + +let + php' = php.buildEnv { + extensions = { enabled, all }: with all; enabled ++ [ apcu ]; + }; +in { + fpm = import ./fpm.nix { inherit system pkgs; php = php'; }; + httpd = import ./httpd.nix { inherit system pkgs; php = php'; }; + pcre = import ./pcre.nix { inherit system pkgs; php = php'; }; } diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix index 3550116a2010..b11f85d39cb6 100644 --- a/nixos/tests/php/fpm.nix +++ b/nixos/tests/php/fpm.nix @@ -50,7 +50,7 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: { assert "PHP Version ${php.version}" in response, "PHP version not detected" # Check so we have database and some other extensions loaded - for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite"]: + for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite", "apcu"]: assert ext in response, f"Missing {ext} extension" machine.succeed(f'test -n "$(php -m | grep -i {ext})"') ''; |