nixos/tests/php: Use curl --fail
This commit is contained in:
parent
8bf2635afc
commit
1332215d59
@ -43,7 +43,7 @@ import ../make-test-python.nix ({pkgs, lib, ...}: {
|
|||||||
machine.wait_for_unit("phpfpm-foobar.service")
|
machine.wait_for_unit("phpfpm-foobar.service")
|
||||||
|
|
||||||
# Check so we get an evaluated PHP back
|
# Check so we get an evaluated PHP back
|
||||||
response = machine.succeed("curl -vvv -s http://127.0.0.1:80/")
|
response = machine.succeed("curl -fvvv -s http://127.0.0.1:80/")
|
||||||
assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
|
assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
|
||||||
|
|
||||||
# Check so we have database and some other extensions loaded
|
# Check so we have database and some other extensions loaded
|
||||||
|
@ -21,7 +21,7 @@ import ../make-test-python.nix ({pkgs, lib, ...}: {
|
|||||||
machine.wait_for_unit("httpd.service")
|
machine.wait_for_unit("httpd.service")
|
||||||
|
|
||||||
# Check so we get an evaluated PHP back
|
# Check so we get an evaluated PHP back
|
||||||
response = machine.succeed("curl -vvv -s http://127.0.0.1:80/")
|
response = machine.succeed("curl -fvvv -s http://127.0.0.1:80/")
|
||||||
assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
|
assert "PHP Version ${pkgs.php.version}" in response, "PHP version not detected"
|
||||||
|
|
||||||
# Check so we have database and some other extensions loaded
|
# Check so we have database and some other extensions loaded
|
||||||
|
@ -32,7 +32,7 @@ in import ../make-test-python.nix ({lib, ...}: {
|
|||||||
''
|
''
|
||||||
machine.wait_for_unit("httpd.service")
|
machine.wait_for_unit("httpd.service")
|
||||||
# Ensure php evaluation by matching on the var_dump syntax
|
# Ensure php evaluation by matching on the var_dump syntax
|
||||||
response = machine.succeed("curl -vvv -s http://127.0.0.1:80/index.php")
|
response = machine.succeed("curl -fvvv -s http://127.0.0.1:80/index.php")
|
||||||
expected = 'string(${toString (builtins.stringLength testString)}) "${testString}"'
|
expected = 'string(${toString (builtins.stringLength testString)}) "${testString}"'
|
||||||
assert expected in response, "Does not appear to be able to use subgroups."
|
assert expected in response, "Does not appear to be able to use subgroups."
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user