mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 17:46:29 +09:00
nixosTests.php: migrate to runTest
This commit is contained in:
parent
a212f0886c
commit
e44f5a37cf
5 changed files with 180 additions and 168 deletions
|
@ -914,11 +914,26 @@ in {
|
|||
phosh = handleTest ./phosh.nix {};
|
||||
photonvision = handleTest ./photonvision.nix {};
|
||||
photoprism = handleTest ./photoprism.nix {};
|
||||
php = handleTest ./php {};
|
||||
php81 = handleTest ./php { php = pkgs.php81; };
|
||||
php82 = handleTest ./php { php = pkgs.php82; };
|
||||
php83 = handleTest ./php { php = pkgs.php83; };
|
||||
php84 = handleTest ./php { php = pkgs.php84; };
|
||||
php = import ./php/default.nix {
|
||||
inherit runTest;
|
||||
php = pkgs.php;
|
||||
};
|
||||
php81 = import ./php/default.nix {
|
||||
inherit runTest;
|
||||
php = pkgs.php81;
|
||||
};
|
||||
php82 = import ./php/default.nix {
|
||||
inherit runTest;
|
||||
php = pkgs.php82;
|
||||
};
|
||||
php83 = import ./php/default.nix {
|
||||
inherit runTest;
|
||||
php = pkgs.php83;
|
||||
};
|
||||
php84 = import ./php/default.nix {
|
||||
inherit runTest;
|
||||
php = pkgs.php84;
|
||||
};
|
||||
phylactery = handleTest ./web-apps/phylactery.nix {};
|
||||
pict-rs = handleTest ./pict-rs.nix {};
|
||||
pingvin-share = handleTest ./pingvin-share.nix {} ;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
system ? builtins.currentSystem,
|
||||
config ? { },
|
||||
pkgs ? import ../../.. { inherit system config; },
|
||||
php ? pkgs.php,
|
||||
runTest,
|
||||
php,
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -11,16 +9,16 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
fpm = import ./fpm.nix {
|
||||
inherit system pkgs;
|
||||
php = php';
|
||||
fpm = runTest {
|
||||
imports = [ ./fpm.nix ];
|
||||
_module.args.php = php';
|
||||
};
|
||||
httpd = import ./httpd.nix {
|
||||
inherit system pkgs;
|
||||
php = php';
|
||||
httpd = runTest {
|
||||
imports = [ ./httpd.nix ];
|
||||
_module.args.php = php';
|
||||
};
|
||||
pcre = import ./pcre.nix {
|
||||
inherit system pkgs;
|
||||
php = php';
|
||||
pcre = runTest {
|
||||
imports = [ ./pcre.nix ];
|
||||
_module.args.php = php';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import ../make-test-python.nix ({ pkgs, lib, php, ... }: {
|
||||
{ lib, php, ... }:
|
||||
{
|
||||
name = "php-${php.version}-fpm-nginx-test";
|
||||
meta.maintainers = lib.teams.php.members;
|
||||
|
||||
nodes.machine = { config, lib, pkgs, ... }: {
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ php ];
|
||||
|
||||
services.nginx = {
|
||||
|
@ -43,7 +46,9 @@ import ../make-test-python.nix ({ pkgs, lib, php, ... }: {
|
|||
};
|
||||
};
|
||||
};
|
||||
testScript = { ... }: ''
|
||||
testScript =
|
||||
{ ... }:
|
||||
''
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_unit("phpfpm-foobar.service")
|
||||
|
||||
|
@ -56,4 +61,4 @@ import ../make-test-python.nix ({ pkgs, lib, php, ... }: {
|
|||
assert ext in response, f"Missing {ext} extension"
|
||||
machine.succeed(f'test -n "$(php -m | grep -i {ext})"')
|
||||
'';
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import ../make-test-python.nix (
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
php,
|
||||
...
|
||||
|
@ -12,7 +10,6 @@ import ../make-test-python.nix (
|
|||
nodes.machine =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
@ -48,4 +45,3 @@ import ../make-test-python.nix (
|
|||
assert ext in response, f"Missing {ext} extension"
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
let
|
||||
testString = "can-use-subgroups";
|
||||
in
|
||||
import ../make-test-python.nix (
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
|
@ -13,7 +12,7 @@ import ../make-test-python.nix (
|
|||
meta.maintainers = lib.teams.php.members;
|
||||
|
||||
nodes.machine =
|
||||
{ lib, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
time.timeZone = "UTC";
|
||||
services.httpd = {
|
||||
|
@ -60,4 +59,3 @@ import ../make-test-python.nix (
|
|||
machine.succeed("${php}/bin/php -f ${pcreJitSeallocForkIssue}")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue