about summary refs log tree commit diff
path: root/nixos/tests/php
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-03-04 15:48:30 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2021-03-04 15:59:38 +0100
commit70ac808b39cecd4bcb67736d3befebc53ae9ca2a (patch)
tree2418170eab22f9bc18cf069fe0612c58df8313c1 /nixos/tests/php
parent8c26eaa144897e9031093e9f56cc15c86f259772 (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/tests/php')
-rw-r--r--nixos/tests/php/fpm.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix
index 02ea517947498..3550116a20107 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})"')
   '';
 })