mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
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.
This commit is contained in:
parent
8c26eaa144
commit
70ac808b39
@ -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})"')
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user