@@ -4,12 +4,13 @@ import ./make-test-python.nix ({ pkgs, ... }:
44 meta = with pkgs.stdenv.lib.maintainers; {
55 maintainers = [ lnl7 ];
66 };
7+
78 machine = { pkgs, ... }: {
89 services.uwsgi.enable = true;
9− services.uwsgi.plugins = [ "python3" ];
10+ services.uwsgi.plugins = [ "python3" "php" ];
1011 services.uwsgi.instance = {
1112 type = "emperor";
12− vassals.hello = {
13+ vassals.python = {
1314 type = "normal";
1415 master = true;
1516 workers = 2;
@@ -25,6 +26,17 @@ import ./make-test-python.nix ({ pkgs, ... }:
2526 '';
2627 pythonPackages = self: with self; [ flask ];
2728 };
29+ vassals.php = {
30+ type = "normal";
31+ master = true;
32+ workers = 2;
33+ http-socket = ":8001";
34+ http-socket-modifier1 = 14;
35+ php-index = "index.php";
36+ php-docroot = pkgs.writeTextDir "index.php" ''
37+ <?php echo "Hello World\n"; ?>
38+ '';
39+ };
2840 };
2941 };
3042
@@ -33,6 +45,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
3345 machine.wait_for_unit("multi-user.target")
3446 machine.wait_for_unit("uwsgi.service")
3547 machine.wait_for_open_port(8000)
48+ machine.wait_for_open_port(8001)
3649 assert "Hello World" in machine.succeed("curl -fv 127.0.0.1:8000")
50+ assert "Hello World" in machine.succeed("curl -fv 127.0.0.1:8001")
3751 '';
3852})