mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #176063 from Izorkin/update-unit
unit: 1.26.1 -> 1.27.0
This commit is contained in:
commit
df9f6848ac
2 changed files with 30 additions and 10 deletions
|
@ -10,15 +10,15 @@ in {
|
|||
services.unit = {
|
||||
enable = true;
|
||||
config = pkgs.lib.strings.toJSON {
|
||||
listeners."*:9080".application = "php_80";
|
||||
applications.php_80 = {
|
||||
type = "php 8.0";
|
||||
listeners."*:9081".application = "php_81";
|
||||
applications.php_81 = {
|
||||
type = "php 8.1";
|
||||
processes = 1;
|
||||
user = "testuser";
|
||||
group = "testgroup";
|
||||
root = "${testdir}/www";
|
||||
index = "info.php";
|
||||
options.file = "${pkgs.unit.usedPhp80}/lib/php.ini";
|
||||
options.file = "${pkgs.unit.usedPhp81}/lib/php.ini";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -34,14 +34,19 @@ in {
|
|||
};
|
||||
};
|
||||
testScript = ''
|
||||
machine.start()
|
||||
|
||||
machine.wait_for_unit("unit.service")
|
||||
machine.wait_for_open_port(9081)
|
||||
|
||||
# Check so we get an evaluated PHP back
|
||||
response = machine.succeed("curl -f -vvv -s http://127.0.0.1:9080/")
|
||||
assert "PHP Version ${pkgs.unit.usedPhp80.version}" in response, "PHP version not detected"
|
||||
response = machine.succeed("curl -f -vvv -s http://127.0.0.1:9081/")
|
||||
assert "PHP Version ${pkgs.unit.usedPhp81.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"]:
|
||||
assert ext in response, f"Missing {ext} extension"
|
||||
|
||||
machine.shutdown()
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue