#
2491:aae60837ac20 |
| 14-Jun-2023 |
Andrei Zeliankou |
Tests: get rid of classes in test files.
Class usage came from the unittest framework and it was always redundant after migration to the pytest. This commit removes classes from files containing te
Tests: get rid of classes in test files.
Class usage came from the unittest framework and it was always redundant after migration to the pytest. This commit removes classes from files containing tests to make them more readable and understandable.
show more ...
|
#
2488:55440e02a873 |
| 12-Jun-2023 |
Andrei Zeliankou |
Tests: prerequisites checking reworked.
Prerequisites check moved to the module level to simplify class structure. Discovery and prerequisites checks functions moved to the separate files. Introduce
Tests: prerequisites checking reworked.
Prerequisites check moved to the module level to simplify class structure. Discovery and prerequisites checks functions moved to the separate files. Introduced "require" fixture to provide per-test requirements check.
show more ...
|
#
2482:88df458ead6d |
| 29-May-2023 |
Andrei Zeliankou |
Tests: more fixtures.
Common methods from applications/proto.py converted to the fixtures. sysctl check moved to the specific file where it is using. Some options moved to the constructor to have ea
Tests: more fixtures.
Common methods from applications/proto.py converted to the fixtures. sysctl check moved to the specific file where it is using. Some options moved to the constructor to have early access.
show more ...
|
#
2477:4633c7db7fb5 |
| 25-May-2023 |
Andrei Zeliankou |
Tests: removed unused variables.
|
Revision tags: 1.30.0-1, 1.30.0, 1.29.1-1, 1.29.1 |
|
#
2330:4b1f175f9c88 |
| 21-Feb-2023 |
Andrei Zeliankou |
Tests: switched to using f-strings.
Previously, it was necessary to support older versions of Python for compatibility. F-strings were released in Python 3.6. Python 3.5 was marked as unsupported
Tests: switched to using f-strings.
Previously, it was necessary to support older versions of Python for compatibility. F-strings were released in Python 3.6. Python 3.5 was marked as unsupported by the end of 2020, so now it's possible to start using f-strings safely for better readability and performance.
show more ...
|
#
2313:62f45cfd957b |
| 26-Jan-2023 |
Andrew Clayton |
Tests: Add some PHP tests for 403 and 404 error handling.
Since the previous commit, we now properly handle 403 Forbidden & 404 Not Found errors in the PHP language module.
This adds a test for 403
Tests: Add some PHP tests for 403 and 404 error handling.
Since the previous commit, we now properly handle 403 Forbidden & 404 Not Found errors in the PHP language module.
This adds a test for 403 Forbidden to test/test_php_application.py, but also fixes a test in test/test_php_targets.py where we were checking for 503 but should have been a 404, which we now do.
Acked-by: Alejandro Colomar <alx@nginx.com> Cc: Andrei Zeliankou <zelenkov@nginx.com> [ Incorporates a couple of small test cleanups from Andrei ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
Revision tags: 1.29.0-1, 1.29.0 |
|
#
2230:83b2d20d8f5c |
| 16-Sep-2022 |
Andrew Clayton |
PHP: allowed to specify URLs without a trailing '/'.
Both @lucatacconi & @mwoodpatrick reported what appears to be the same issue on GitHub. Namely that when using the PHP language module and trying
PHP: allowed to specify URLs without a trailing '/'.
Both @lucatacconi & @mwoodpatrick reported what appears to be the same issue on GitHub. Namely that when using the PHP language module and trying to access a URL that is a directory but without specifying the trailing '/', they were getting a '503 Service Unavailable' error.
Note: This is when _not_ using the 'script' option.
E.g with the following config
{ "listeners": { "[::1]:8080": { "pass": "applications/php" } },
"applications": { "php": { "type": "php", "root": "/var/tmp/unit-php" } } }
and with a directory path of /var/tmp/unit-php/foo containing an index.php, you would see the following
$ curl http://localhost/foo <title>Error 503</title> Error 503
However
$ curl http://localhost/foo/
would work and serve up the index.php
This commit fixes the above so you get the desired behaviour without specifying the trailing '/' by doing the following
1] If the URL doesn't end in .php and doesn't have a trailing '/' then check if the requested path is a directory.
2) If it is a directory then create a 301 re-direct pointing to it. This matches the behaviour of the likes of nginx, Apache and lighttpd.
This also matches the behaviour of the "share" action in Unit.
This doesn't effect the behaviour of the 'script' option which bypasses the nxt_php_dynamic_request() function.
This also adds a couple of tests to test/test_php_application.py to ensure this continues to work.
Closes: <https://github.com/nginx/unit/issues/717> Closes: <https://github.com/nginx/unit/issues/753> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
Revision tags: 1.28.0-1, 1.28.0 |
|
#
2190:fbfec2aaf4c3 |
| 07-Sep-2022 |
Andrei Zeliankou |
Tests: minor fixes.
|
Revision tags: 1.27.0-1, 1.27.0 |
|
#
2073:bc6ad31ce286 |
| 11-Apr-2022 |
Andrei Zeliankou |
Tests: style.
|
#
2055:84cb1ec94bae |
| 12-Dec-2021 |
Andrei Zeliankou |
Tests: fixed type of applications.
|
#
2054:357dee5c1861 |
| 11-Dec-2021 |
Andrei Zeliankou |
Tests: added more OPcache tests.
|
#
2053:83a2f582bc2a |
| 10-Dec-2021 |
Andrei Zeliankou |
Tests: fixed path to the "php.ini" file.
|
Revision tags: 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0 |
|
#
2000:c42fcbf93789 |
| 09-Nov-2021 |
Max Romanov |
Tests: PHP shared opcache test added.
|
#
1971:3410f9d2a662 |
| 18-Oct-2021 |
Andrei Zeliankou |
Tests: style.
|
Revision tags: 1.25.0-1, 1.25.0, 1.24.0-1, 1.24.0 |
|
#
1862:a605c2660b1d |
| 07-May-2021 |
Andrei Zeliankou |
Tests: PHP test with getting variable before the script is loaded.
|
#
1850:839024ce4a6a |
| 08-Apr-2021 |
Max Romanov |
Tests: preserving unit.log when run without restart.
Introducing "unit.log.Log" class for "unit.log" file management. Moving "findall()" function into TestApplicationProto. Using "os.kill()" to send
Tests: preserving unit.log when run without restart.
Introducing "unit.log.Log" class for "unit.log" file management. Moving "findall()" function into TestApplicationProto. Using "os.kill()" to send signals.
show more ...
|
#
1848:4bd548074e2c |
| 05-Apr-2021 |
Andrei Zeliankou |
Tests: style.
|
Revision tags: 1.23.0-1, 1.23.0, 1.22.0-1, 1.22.0 |
|
#
1775:4b4991514356 |
| 14-Jan-2021 |
Andrei Zeliankou |
Tests: added missing checks for configuration results.
|
#
1771:94cf6c5fafbd |
| 13-Jan-2021 |
Andrei Zeliankou |
Tests: style.
|
#
1770:e4ece1ff4413 |
| 12-Jan-2021 |
Andrei Zeliankou |
Tests: unit_stop() removed where possible.
Since wait_for_record() was introduced there is no need to stop Unit before parsing unit.log.
|
#
1742:0b6b58efc489 |
| 10-Dec-2020 |
Andrei Zeliankou |
Tests: added tests for PHP_AUTH_* variables.
|
#
1730:44912af5b3e6 |
| 06-Dec-2020 |
Andrei Zeliankou |
Tests: options moved to the separate class.
This change is necessary to separate the logic and prevent possible circular dependency.
|
Revision tags: 1.21.0-1, 1.21.0 |
|
#
1701:15f4fd6c9521 |
| 11-Nov-2020 |
Andrei Zeliankou |
Tests: added a test for fastcgi_finish_request() function.
|
#
1654:fc7d0578e124 |
| 19-Oct-2020 |
Andrei Zeliankou |
Tests: fixed unit.log print.
|
Revision tags: 1.20.0-1, 1.20.0 |
|
#
1636:979d2b72930b |
| 06-Oct-2020 |
Valentin Bartenev |
PHP: compatibility with 8.0.0 RC1.
This closes #474 PR on GitHub.
|