From 70ac808b39cecd4bcb67736d3befebc53ae9ca2a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 4 Mar 2021 15:48:30 +0100 Subject: [PATCH] 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. --- nixos/tests/php/fpm.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix index 02ea5179474..3550116a201 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})"') ''; })