summary refs log tree commit diff
path: root/nixos/tests/php
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2021-06-26 09:46:46 +0200
committerElis Hirwing <elis@hirwing.se>2021-06-26 20:07:56 +0200
commit94d07b7492416e2f6b8c18f229d1c13f4f48349c (patch)
tree4cd91c4a0673273f0131e6a0a1b5d0dd8240a736 /nixos/tests/php
parent42cadf5a768c81d912adba037d30c39d09f326c7 (diff)
downloadnixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar
nixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.gz
nixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.bz2
nixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.lz
nixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.xz
nixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.zst
nixpkgs-94d07b7492416e2f6b8c18f229d1c13f4f48349c.zip
php: Run nixpkgs-fmt on all php related files
Diffstat (limited to 'nixos/tests/php')
-rw-r--r--nixos/tests/php/default.nix5
-rw-r--r--nixos/tests/php/fpm.nix32
-rw-r--r--nixos/tests/php/httpd.nix18
-rw-r--r--nixos/tests/php/pcre.nix20
4 files changed, 41 insertions, 34 deletions
diff --git a/nixos/tests/php/default.nix b/nixos/tests/php/default.nix
index cf78c9db53b..c0386385753 100644
--- a/nixos/tests/php/default.nix
+++ b/nixos/tests/php/default.nix
@@ -1,5 +1,5 @@
 { system ? builtins.currentSystem
-, config ? {}
+, config ? { }
 , pkgs ? import ../../.. { inherit system config; }
 , php ? pkgs.php
 }:
@@ -8,7 +8,8 @@ let
   php' = php.buildEnv {
     extensions = { enabled, all }: with all; enabled ++ [ apcu ];
   };
-in {
+in
+{
   fpm = import ./fpm.nix { inherit system pkgs; php = php'; };
   httpd = import ./httpd.nix { inherit system pkgs; php = php'; };
   pcre = import ./pcre.nix { inherit system pkgs; php = php'; };
diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix
index b11f85d39cb..31a79bb4dbe 100644
--- a/nixos/tests/php/fpm.nix
+++ b/nixos/tests/php/fpm.nix
@@ -1,4 +1,4 @@
-import ../make-test-python.nix ({pkgs, lib, php, ...}: {
+import ../make-test-python.nix ({ pkgs, lib, php, ... }: {
   name = "php-${php.version}-fpm-nginx-test";
   meta.maintainers = lib.teams.php.members;
 
@@ -8,21 +8,23 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: {
     services.nginx = {
       enable = true;
 
-      virtualHosts."phpfpm" = let
-        testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();";
-      in {
-        root = "${testdir}/web";
-        locations."~ \\.php$".extraConfig = ''
-          fastcgi_pass unix:${config.services.phpfpm.pools.foobar.socket};
-          fastcgi_index index.php;
-          include ${pkgs.nginx}/conf/fastcgi_params;
-          include ${pkgs.nginx}/conf/fastcgi.conf;
-        '';
-        locations."/" = {
-          tryFiles = "$uri $uri/ index.php";
-          index = "index.php index.html index.htm";
+      virtualHosts."phpfpm" =
+        let
+          testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();";
+        in
+        {
+          root = "${testdir}/web";
+          locations."~ \\.php$".extraConfig = ''
+            fastcgi_pass unix:${config.services.phpfpm.pools.foobar.socket};
+            fastcgi_index index.php;
+            include ${pkgs.nginx}/conf/fastcgi_params;
+            include ${pkgs.nginx}/conf/fastcgi.conf;
+          '';
+          locations."/" = {
+            tryFiles = "$uri $uri/ index.php";
+            index = "index.php index.html index.htm";
+          };
         };
-      };
     };
 
     services.phpfpm.pools."foobar" = {
diff --git a/nixos/tests/php/httpd.nix b/nixos/tests/php/httpd.nix
index a5ca9b3c5d1..36d90e72d7d 100644
--- a/nixos/tests/php/httpd.nix
+++ b/nixos/tests/php/httpd.nix
@@ -1,4 +1,4 @@
-import ../make-test-python.nix ({pkgs, lib, php, ...}: {
+import ../make-test-python.nix ({ pkgs, lib, php, ... }: {
   name = "php-${php.version}-httpd-test";
   meta.maintainers = lib.teams.php.members;
 
@@ -6,14 +6,16 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: {
     services.httpd = {
       enable = true;
       adminAddr = "admin@phpfpm";
-      virtualHosts."phpfpm" = let
-        testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();";
-      in {
-        documentRoot = "${testdir}/web";
-        locations."/" = {
-          index = "index.php index.html";
+      virtualHosts."phpfpm" =
+        let
+          testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();";
+        in
+        {
+          documentRoot = "${testdir}/web";
+          locations."/" = {
+            index = "index.php index.html";
+          };
         };
-      };
       phpPackage = php;
       enablePHP = true;
     };
diff --git a/nixos/tests/php/pcre.nix b/nixos/tests/php/pcre.nix
index 97572f63af3..917184b975e 100644
--- a/nixos/tests/php/pcre.nix
+++ b/nixos/tests/php/pcre.nix
@@ -1,6 +1,7 @@
 let
   testString = "can-use-subgroups";
-in import ../make-test-python.nix ({lib, php, ...}: {
+in
+import ../make-test-python.nix ({ lib, php, ... }: {
   name = "php-${php.version}-httpd-pcre-jit-test";
   meta.maintainers = lib.teams.php.members;
 
@@ -12,14 +13,15 @@ in import ../make-test-python.nix ({lib, php, ...}: {
       phpPackage = php;
       enablePHP = true;
       phpOptions = "pcre.jit = true";
-      extraConfig = let
-        testRoot = pkgs.writeText "index.php"
-          ''
-            <?php
-            preg_match('/(${testString})/', '${testString}', $result);
-            var_dump($result);
-          '';
-      in
+      extraConfig =
+        let
+          testRoot = pkgs.writeText "index.php"
+            ''
+              <?php
+              preg_match('/(${testString})/', '${testString}', $result);
+              var_dump($result);
+            '';
+        in
         ''
           Alias / ${testRoot}/