diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-03-04 15:48:30 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-03-04 15:59:38 +0100 |
commit | 70ac808b39cecd4bcb67736d3befebc53ae9ca2a (patch) | |
tree | 2418170eab22f9bc18cf069fe0612c58df8313c1 /nixos | |
parent | 8c26eaa144897e9031093e9f56cc15c86f259772 (diff) |
nixos/tests/php/fpm: make sure that extensions are actually loaded
The phpinfo output from 127.0.0.1:80 only shows configuration options
and thus leads to false-positives.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/php/fpm.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix index 02ea51794749..3550116a2010 100644 --- a/nixos/tests/php/fpm.nix +++ b/nixos/tests/php/fpm.nix @@ -3,6 +3,8 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: { meta.maintainers = lib.teams.php.members; machine = { config, lib, pkgs, ... }: { + environment.systemPackages = [ php ]; + services.nginx = { enable = true; @@ -50,5 +52,6 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: { # Check so we have database and some other extensions loaded for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite"]: assert ext in response, f"Missing {ext} extension" + machine.succeed(f'test -n "$(php -m | grep -i {ext})"') ''; }) |