summary refs log tree commit diff
path: root/nixos/tests/php
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2020-04-16 23:21:26 +0200
committerJan Tojnar <jtojnar@gmail.com>2020-04-17 14:41:20 +0200
commit23a6903bb7f32068587a66af00404a5e81881215 (patch)
treeb37be029b80aab7077f37b266bdd9e48fbc45c4b /nixos/tests/php
parentb69556c5805bb1482bbfe954f0dfa2d74dd9f5db (diff)
downloadnixpkgs-23a6903bb7f32068587a66af00404a5e81881215.tar
nixpkgs-23a6903bb7f32068587a66af00404a5e81881215.tar.gz
nixpkgs-23a6903bb7f32068587a66af00404a5e81881215.tar.bz2
nixpkgs-23a6903bb7f32068587a66af00404a5e81881215.tar.lz
nixpkgs-23a6903bb7f32068587a66af00404a5e81881215.tar.xz
nixpkgs-23a6903bb7f32068587a66af00404a5e81881215.tar.zst
nixpkgs-23a6903bb7f32068587a66af00404a5e81881215.zip
nixosTests.php.fpm: Clean up to match httpd test
Diffstat (limited to 'nixos/tests/php')
-rw-r--r--nixos/tests/php/fpm.nix10
1 files changed, 4 insertions, 6 deletions
diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix
index e93a3183418..1e4ced24b6c 100644
--- a/nixos/tests/php/fpm.nix
+++ b/nixos/tests/php/fpm.nix
@@ -43,13 +43,11 @@ import ../make-test-python.nix ({pkgs, ...}: {
     machine.wait_for_unit("phpfpm-foobar.service")
 
     # Check so we get an evaluated PHP back
-    assert "PHP Version ${pkgs.php.version}" in machine.succeed("curl -vvv -s http://127.0.0.1:80/")
+    response = machine.succeed("curl -vvv -s http://127.0.0.1:80/")
+    assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
 
     # Check so we have database and some other extensions loaded
-    assert "json" in machine.succeed("curl -vvv -s http://127.0.0.1:80/")
-    assert "opcache" in machine.succeed("curl -vvv -s http://127.0.0.1:80/")
-    assert "pdo_mysql" in machine.succeed("curl -vvv -s http://127.0.0.1:80/")
-    assert "pdo_pgsql" in machine.succeed("curl -vvv -s http://127.0.0.1:80/")
-    assert "pdo_sqlite" in machine.succeed("curl -vvv -s http://127.0.0.1:80/")
+    for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite"]:
+        assert ext in response, f"Missing {ext} extension"
   '';
 })