nixos/tests/php: Declare php package used instead of just using default
This commit is contained in:
parent
ac8a8fe2fa
commit
c6f0a1db39
|
@ -1,8 +1,9 @@
|
|||
{ system ? builtins.currentSystem,
|
||||
config ? {},
|
||||
pkgs ? import ../../.. { inherit system config; }
|
||||
{ system ? builtins.currentSystem
|
||||
, config ? {}
|
||||
, pkgs ? import ../../.. { inherit system config; }
|
||||
, php ? pkgs.php
|
||||
}: {
|
||||
fpm = import ./fpm.nix { inherit system pkgs; };
|
||||
httpd = import ./httpd.nix { inherit system pkgs; };
|
||||
pcre = import ./pcre.nix { inherit system pkgs; };
|
||||
fpm = import ./fpm.nix { inherit system pkgs php; };
|
||||
httpd = import ./httpd.nix { inherit system pkgs php; };
|
||||
pcre = import ./pcre.nix { inherit system pkgs php; };
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ../make-test-python.nix ({pkgs, lib, ...}: {
|
||||
name = "php-fpm-nginx-test";
|
||||
import ../make-test-python.nix ({pkgs, lib, php, ...}: {
|
||||
name = "php-${php.version}-fpm-nginx-test";
|
||||
meta.maintainers = lib.teams.php.members;
|
||||
|
||||
machine = { config, lib, pkgs, ... }: {
|
||||
|
@ -25,6 +25,7 @@ import ../make-test-python.nix ({pkgs, lib, ...}: {
|
|||
|
||||
services.phpfpm.pools."foobar" = {
|
||||
user = "nginx";
|
||||
phpPackage = php;
|
||||
settings = {
|
||||
"listen.group" = "nginx";
|
||||
"listen.mode" = "0600";
|
||||
|
@ -44,7 +45,7 @@ import ../make-test-python.nix ({pkgs, lib, ...}: {
|
|||
|
||||
# Check so we get an evaluated PHP back
|
||||
response = machine.succeed("curl -fvvv -s http://127.0.0.1:80/")
|
||||
assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
|
||||
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"]:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ../make-test-python.nix ({pkgs, lib, ...}: {
|
||||
name = "php-httpd-test";
|
||||
import ../make-test-python.nix ({pkgs, lib, php, ...}: {
|
||||
name = "php-${php.version}-httpd-test";
|
||||
meta.maintainers = lib.teams.php.members;
|
||||
|
||||
machine = { config, lib, pkgs, ... }: {
|
||||
|
@ -14,6 +14,7 @@ import ../make-test-python.nix ({pkgs, lib, ...}: {
|
|||
index = "index.php index.html";
|
||||
};
|
||||
};
|
||||
phpPackage = php;
|
||||
enablePHP = true;
|
||||
};
|
||||
};
|
||||
|
@ -22,7 +23,7 @@ import ../make-test-python.nix ({pkgs, lib, ...}: {
|
|||
|
||||
# Check so we get an evaluated PHP back
|
||||
response = machine.succeed("curl -fvvv -s http://127.0.0.1:80/")
|
||||
assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
|
||||
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"]:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
let
|
||||
testString = "can-use-subgroups";
|
||||
in import ../make-test-python.nix ({lib, ...}: {
|
||||
name = "php-httpd-pcre-jit-test";
|
||||
in import ../make-test-python.nix ({lib, php, ...}: {
|
||||
name = "php-${php.version}-httpd-pcre-jit-test";
|
||||
meta.maintainers = lib.teams.php.members;
|
||||
|
||||
machine = { lib, pkgs, ... }: {
|
||||
|
@ -9,6 +9,7 @@ in import ../make-test-python.nix ({lib, ...}: {
|
|||
services.httpd = {
|
||||
enable = true;
|
||||
adminAddr = "please@dont.contact";
|
||||
phpPackage = php;
|
||||
enablePHP = true;
|
||||
phpOptions = "pcre.jit = true";
|
||||
extraConfig = let
|
||||
|
|
Loading…
Reference in New Issue