summary refs log tree commit diff
path: root/nixos/tests/uwsgi.nix
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2020-12-21 00:22:29 +0100
committerДамјан Георгиевски <gdamjan@gmail.com>2020-12-21 16:50:54 +0100
commitc32ef2192f0117e5355e3a049f79bcf3fda9f504 (patch)
tree716f00bce6b842af5f1c63861e76b3133f1b4b07 /nixos/tests/uwsgi.nix
parent22e8804308ff8e328f9f17210573a8a66c3b9a3f (diff)
downloadnixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.tar
nixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.tar.gz
nixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.tar.bz2
nixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.tar.lz
nixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.tar.xz
nixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.tar.zst
nixpkgs-c32ef2192f0117e5355e3a049f79bcf3fda9f504.zip
nixos/tests/uwsgi: test PHP plugin
Diffstat (limited to 'nixos/tests/uwsgi.nix')
-rw-r--r--nixos/tests/uwsgi.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/nixos/tests/uwsgi.nix b/nixos/tests/uwsgi.nix
index 7f4945a8803..5c0b294e2d2 100644
--- a/nixos/tests/uwsgi.nix
+++ b/nixos/tests/uwsgi.nix
@@ -4,12 +4,13 @@ import ./make-test-python.nix ({ pkgs, ... }:
   meta = with pkgs.stdenv.lib.maintainers; {
     maintainers = [ lnl7 ];
   };
+
   machine = { pkgs, ... }: {
     services.uwsgi.enable = true;
-    services.uwsgi.plugins = [ "python3" ];
+    services.uwsgi.plugins = [ "python3" "php" ];
     services.uwsgi.instance = {
       type = "emperor";
-      vassals.hello = {
+      vassals.python = {
         type = "normal";
         master = true;
         workers = 2;
@@ -25,6 +26,17 @@ import ./make-test-python.nix ({ pkgs, ... }:
         '';
         pythonPackages = self: with self; [ flask ];
       };
+      vassals.php = {
+        type = "normal";
+        master = true;
+        workers = 2;
+        http-socket = ":8001";
+        http-socket-modifier1 = 14;
+        php-index = "index.php";
+        php-docroot = pkgs.writeTextDir "index.php" ''
+          <?php echo "Hello World\n"; ?>
+        '';
+      };
     };
   };
 
@@ -33,6 +45,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
       machine.wait_for_unit("multi-user.target")
       machine.wait_for_unit("uwsgi.service")
       machine.wait_for_open_port(8000)
+      machine.wait_for_open_port(8001)
       assert "Hello World" in machine.succeed("curl -fv 127.0.0.1:8000")
+      assert "Hello World" in machine.succeed("curl -fv 127.0.0.1:8001")
     '';
 })