Commit Graph
100 Commits
Author SHA1 Message Date
Andrei Zeliankouandandrey-zelenkov 088117008c Added version 1.32.0 CHANGES 2024-02-27 12:24:44 +00:00
Andrei Zeliankouandandrey-zelenkov ace553dca4 Generated Dockerfiles for Unit 1.32.0 2024-02-27 12:24:44 +00:00
Andrei Zeliankouandandrey-zelenkov 4d25c61224 Edited changes.xml for the 1.32.0 release 2024-02-27 12:24:44 +00:00
Andrei Zeliankouandandrey-zelenkov cabea47de7 Tests: renamed test_python_procman.py since it's not Python-specific
Python applications are used only to generate responses here and can be
replaced by applications written in any other language.  While the
"_python" prefix is used to indicate that the file contains tests
specific to the Python module.
2024-02-21 17:40:25 +00:00
Andrei Zeliankouandandrey-zelenkov dbd9d25f17 Tests: skip some of TLS reconfiguration tests under AddressSanitizer
These tests cause router crash when run with AddressSanitizer:

=================================================================
==77196==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c000079340 at pc 0x55d56b132d4b bp 0x7f8cc7f346b0 sp 0x7f8cc7f346a0
READ of size 1 at 0x60c000079340 thread T1
    #0 0x55d56b132d4a in nxt_openssl_conn_io_shutdown src/nxt_openssl.c:1466
    #1 0x55d56b0f6a25 in nxt_h1p_closing src/nxt_h1proto.c:2069
    #2 0x55d56b1009a6 in nxt_h1p_shutdown src/nxt_h1proto.c:2038
    #3 0x55d56b1014c3 in nxt_h1p_request_close src/nxt_h1proto.c:1718
    #4 0x55d56b1045c0 in nxt_http_request_close_handler src/nxt_http_request.c:864
    #5 0x55d56b104988 in nxt_http_request_done src/nxt_http_request.c:795
    #6 0x55d56b0ba0c3 in nxt_event_engine_start src/nxt_event_engine.c:542
    #7 0x55d56b0dcac2 in nxt_router_thread_start src/nxt_router.c:3645
    #8 0x55d56b0b421b in nxt_thread_trampoline src/nxt_thread.c:126
    #9 0x7f8ccab95ac2  (/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
    #10 0x7f8ccac2784f  (/lib/x86_64-linux-gnu/libc.so.6+0x12684f)
2024-02-21 17:40:25 +00:00
Andrei Zeliankouandandrey-zelenkov 99da2f3c8e Tests: check for the AddressSanitizer flag during discovery
This flag is necessary to either run or skip certain tests that have
specific behavior depending on whether AddressSanitizer is enabled.

For instance, some tests may fail only when the binary is compiled
with AddressSanitizer.
2024-02-21 17:40:25 +00:00
Andrei Zeliankouandandrey-zelenkov 7883acc62d Tests: Ruby hook tests unstable for version older 3.0
It can fail with reporting following alert:

[alert] 137462#137462 mount("none", "/tmp/unit-test-636e0uh8/proc", "proc", 2097162, "") (16: Device or resource busy)
2024-02-21 17:40:25 +00:00
Andrei Zeliankouandandrey-zelenkov 697a585062 Python: bytearray body support for ASGI module.
@filiphanes requested support for bytearray
and memoryview in the request body here:
<https://github.com/nginx/unit/issues/648>

This patch implements bytearray body support only.
Memoryview body still need to be implemented.
2024-02-21 14:06:43 +00:00
Andrei Zeliankouandandrey-zelenkov f71ead5fa5 Updated copyright notice. 2024-02-20 16:08:36 +00:00
Andrei Zeliankouandandrey-zelenkov 2765522b94 Tests: NJS request variables 2024-02-20 14:55:00 +00:00
Andrei Zeliankouandandrey-zelenkov ea239635be Docker: Switch python3.12 to using github
Forgotten in
<https://github.com/nginx/unit/commit/c3af21e970ca3c822004cfda7c5b56ec07d99da9>
2024-02-19 15:18:13 +00:00
Andrei Zeliankouandandrey-zelenkov ad3645074e Tests: "if" option in access logging.
Conditional access logging was introduced here:
https://github.com/nginx/unit/commit/4c91bebb50d06b28e369d68b23022caa072cf62d
2024-01-29 17:54:26 +00:00
Andrei Zeliankouandandrey-zelenkov 6452ca111c Node.js: fixed "httpVersion" variable format
According to the Node.js documenation this variable
should only include numbering scheme.

Thanks to @dbit-xia.

Closes: https://github.com/nginx/unit/issues/1085
2024-01-26 15:17:00 +00:00
Andrei Zeliankouandandrey-zelenkov 4e08f49549 Tests: added Ruby tests with array in header values 2024-01-16 15:59:30 +00:00
Andrei Zeliankou a1e00b4e28 White space formatting fixes
Closes: <https://github.com/nginx/unit/pull/1062>
2024-01-16 15:37:07 +00:00
Andrei Zeliankou 5a8337933d Tests: pathlib used where appropriate
Also fixed various pylint errors and style issues.
2024-01-15 15:48:58 +00:00
Andrei Zeliankou 0fc5232107 Tests: added more expected Ruby features. 2023-11-17 17:28:52 +00:00
Andrei Zeliankou 8fbe437ca6 Tests: Ruby input.rewind is no longer required.
For more information see:
https://github.com/rack/rack/commit/42aff22f708123839ba706cbe659d108b47c40c7
2023-11-17 17:28:44 +00:00
Andrei Zeliankou 1443d623d4 Node.js: ServerResponse.flushHeaders() implemented.
This closes #1006 issue on GitHub.

Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
2023-11-17 17:27:31 +00:00
Andrei Zeliankou 0b85fe29f7 Tests: 8XXX used as default port range.
After the launch of the project, the testing infrastructure was shared with
nginx project in some cases.  To avoid port overlap, a decision was made
to shift the port range for Unit tests.  This problem was resolved a long time
ago and is no longer relevant, so it is now safe to use port 8XXX range as the
default, as it is more appropriate for testing purposes.
2023-11-08 18:37:02 +00:00
Andrei Zeliankou 78c133d0ca Var: simplified length calculation for $status variable. 2023-11-08 17:38:07 +00:00
Andrei Zeliankou a88e857b5b Var: $request_id variable.
This variable contains a string that is formed using random data and
can be used as a unique request identifier.

This closes #714 issue on GitHub.
2023-11-08 17:34:59 +00:00
Andrei Zeliankou 822303e23c Version bump. 2023-10-26 14:26:53 +01:00
Andrei Zeliankou fb33ec86a3 Unit 1.31.1 release. 2023-10-19 11:47:22 +01:00
Andrei Zeliankou 09ab626b13 Generated Dockerfiles for Unit 1.31.1. 2023-10-17 14:15:38 +00:00
Andrei Zeliankou 6736841acc Added version 1.31.1 CHANGES. 2023-10-19 11:44:18 +01:00
Andrei Zeliankou f5d2088a5c Edited changes.xml for the 1.31.1 release. 2023-10-19 11:42:05 +01:00
Andrei Zeliankou b47415fb72 Prepearing for 1.31.1 release. 2023-10-19 11:41:25 +01:00
Andrei Zeliankou e78ada0140 Tests: added PHP test with rewrite and query string.
This test reproduces https://github.com/nginx/unit/issues/964.
2023-10-11 16:42:55 +01:00
Andrei Zeliankou c433a3c914 Rewrite and response headers mentioned in OpenAPI. 2023-10-11 15:21:09 +01:00
Andrei Zeliankou 37b0f34fb5 Proxy mentioned in OpenAPI. 2023-10-04 12:53:03 +01:00
Andrei Zeliankou 135160934a Tests: added Java test with multiple headers.
This test reproduce https://github.com/nginx/unit/issues/923.
2023-10-02 15:59:00 +01:00
Andrei Zeliankou 2d0e502d2a Node.js: ServerRequest.destroy() implemented.
This closes #871 issue on GitHub.
2023-09-26 12:49:39 +01:00
Andrei Zeliankou e0c2675774 Node.js: response body chunk can now be a Uint8Array.
Starting from Node.js 15.0.0 the chunk parameter of the response.write()
can be a Uint8Array.

This closes #870 issue on GitHub.
2023-09-26 12:49:39 +01:00
Andrei Zeliankou 34cf6e770b Version file bump.
Forgotten in f717dc15b47e.
2023-09-04 14:06:21 +01:00
Andrei Zeliankou 8fae346836 Tests: added tests for the "response_headers" option. 2023-09-04 12:25:36 +01:00
Andrei Zeliankou 44f3886456 Version bump. 2023-09-04 12:03:39 +01:00
Andrei Zeliankou 75e96cb3e7 Unit 1.31.0 release. 2023-08-28 17:54:48 +01:00
Andrei Zeliankou fd43b1b0ce Generated Dockerfiles for Unit 1.31.0. 2023-08-23 11:29:07 +00:00
Andrei Zeliankou 13ee1d725c Added version 1.31.0 CHANGES. 2023-08-28 17:51:45 +01:00
Andrei Zeliankou 4c0d0123ab Mention WebAssembly application module in changes.xml.
Also separate header variables and "response_headers" option features.
2023-08-28 17:33:26 +01:00
Andrei Zeliankou 989e8cd9c8 Edited changes.xml for the 1.31.0 release. 2023-08-22 11:03:02 +01:00
Andrei Zeliankou 2ad03caf32 Tests: added tests for response header variables. 2023-07-11 15:51:53 +01:00
Andrei Zeliankou 075c6a7038 Tests: check TLS methods availability more carefully. 2023-07-10 15:24:15 +01:00
Andrei Zeliankou 3c7743344b Tests: fixed exception handling. 2023-07-10 01:57:12 +01:00
Andrei Zeliankou 0461e804c1 Tests: no caching for $uri variable. 2023-06-14 18:30:40 +01:00
Andrei Zeliankou c183bd8749 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.
2023-06-14 18:20:09 +01:00
Andrei Zeliankou c6d05191a0 Tests: removed alert skip, unnecessary after 1a48ea61fec8. 2023-06-12 17:28:42 +01:00
Andrei Zeliankou ce2405ec3d 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.
2023-06-12 14:16:59 +01:00
Andrei Zeliankou 31ff94add9 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.
2023-05-29 16:45:49 +01:00
Andrei Zeliankou f55818059c Tests: Log reworked.
All log-related code moved to the log.py.
2023-05-29 14:23:52 +01:00
Andrei Zeliankou b034bf6703 Tests: assertion related fixes. 2023-05-25 16:56:14 +01:00
Andrei Zeliankou 0132e552d0 Tests: "temp_dir" fixture used were possible. 2023-05-25 16:56:14 +01:00
Andrei Zeliankou 18fcc07c77 Tests: unified setup method usage.
To make fixtures accessible inside of setup methods in tests all these methods
are renamed to the "setup_method_fixture" and decorated by autouse flag.

Also all setup methods moved to the top of the files.
2023-05-25 16:56:14 +01:00
Andrei Zeliankou 3e4fa1e202 Tests: removed unused variables. 2023-05-25 14:26:12 +01:00
Andrei Zeliankou 71f8c58f7f Updated copyright notice. 2023-05-24 16:27:24 +01:00
Andrei Zeliankou 3f655cbd07 Version bump. 2023-05-24 16:24:42 +01:00
Andrei Zeliankou 5f8d58d2a4 Tests: added tests for "server_version" option. 2023-05-19 18:27:41 +01:00
Andrei Zeliankou aa57254674 Tests: added ASGI application with IPv6 address test. 2023-05-19 18:27:07 +01:00
Andrei Zeliankou faf97dc060 Unit 1.30.0 release. 2023-05-10 17:44:20 +01:00
Andrei Zeliankou fcf1628b2c Merged with the 1.29 branch. 2023-05-10 17:22:28 +01:00
Andrei Zeliankou 03718e0bdf Added version 1.30.0 CHANGES. 2023-05-10 16:53:01 +01:00
Andrei Zeliankou ec275200f7 Edited "changes.xml" for the 1.30.0 release. 2023-05-10 16:07:25 +01:00
Andrei Zeliankou e88e16d11e Tests: added tests for NJS loadable modules. 2023-05-10 13:02:52 +01:00
Andrei Zeliankou 56af7bb825 Tests: added tests for the URI rewrite. 2023-05-09 13:52:09 +01:00
Andrei Zeliankou d5382aebb7 Unit 1.29.1 release. 2023-02-28 16:18:19 +00:00
Andrei Zeliankou 0af1253c17 Generated Dockerfiles for Unit 1.29.1. 2023-02-28 14:52:32 +00:00
Andrei Zeliankou 32f9c3d6f9 Added version 1.29.1 CHANGES. 2023-02-28 16:16:27 +00:00
Andrei Zeliankou 8295a0eb08 Changes moved to the correct section. 2023-02-28 16:01:54 +00:00
Andrei Zeliankou ca9988171b Added missing fixes in changes.xml. 2023-02-28 13:09:06 +00:00
Andrei Zeliankou 1b7cf1f3d0 Tests: added Python tests with encoding. 2023-02-21 15:35:38 +00:00
Andrei Zeliankou b24257c8f6 Tests: added tests for the "log_route" option. 2023-03-21 19:20:23 +00:00
Andrei Zeliankou 28bdeec614 Tests: added Perl test with many responses using streaming body. 2023-03-14 11:06:09 +00:00
Andrei Zeliankou 4ed4283cff Tests: _clear_temp_dir() function introduced.
Also added temporary directory clearing after checking available
modules to prevent garbage environment when tests start.
2023-03-07 14:47:39 +00:00
Andrei Zeliankou 814815a3c5 Merged with the 1.29 branch. 2023-03-01 18:25:52 +00:00
Andrei Zeliankou 32c9b8c3cd Added missing fixes in changes.xml. 2023-02-28 13:42:39 +00:00
Andrei Zeliankou 7934dcabbc 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.
2023-02-21 17:21:29 +00:00
Andrei Zeliankou fcabbf09d8 Tests: added Python tests with encoding. 2023-02-21 15:35:38 +00:00
Andrei Zeliankou 7f046c80b9 Tests: removed list usage as default argument.
Mutable types as default arguments is bad practice since
they are evaluated only once when the function is defined.
2023-02-21 14:40:47 +00:00
Andrei Zeliankou 05c5639458 Tests: added NJS iteration tests. 2023-01-24 01:12:22 +00:00
Andrei Zeliankou 6dad38f655 Tests: NJS tests reworked. 2023-01-24 01:11:44 +00:00
Andrei Zeliankou aaba6fdcc9 Version bump. 2022-12-16 12:42:53 +00:00
Andrei Zeliankou 4409a10ff0 Unit 1.29.0 release. 2022-12-15 12:52:00 +00:00
Andrei Zeliankou 87a1a9c0d2 Generated Dockerfiles for Unit 1.29.0. 2022-12-15 12:42:01 +00:00
Andrei Zeliankou edd7ebaf60 Added version 1.29.0 CHANGES. 2022-12-15 12:32:46 +00:00
Andrei Zeliankou f65efe73a4 Reordered changes for 1.29.0 by significance (subjective). 2022-12-15 12:30:38 +00:00
Andrei Zeliankou 4b39cb1fc7 Tests: added tests for "path" option in isolation/cgroup. 2022-12-14 19:00:14 +00:00
Andrei Zeliankou 6313cffd26 Tests: added tests for the large header buffer settings.
Added tests for the "large_header_buffer_size" and
"large_header_buffers" configuration options.
2022-12-13 14:51:11 +00:00
Andrei Zeliankou 12e2cbae8a Tests: stop execution if can't unmount any filesystem. 2022-12-12 16:27:02 +00:00
Andrei Zeliankou 648e91a623 Tests: pretty output.
Hide expected alerts by default.
Silence succesfull "go build" information.
2022-12-12 16:24:54 +00:00
Andrei Zeliankou 55b9a5307d Tests: fixed tests to run as privileged user. 2022-12-09 14:17:49 +00:00
Andrei Zeliankou d862f581db Node.js: added "shortCircuit" option for ES modules hook.
Starting from Node.js v18.6.0 return value from all hooks must have
"shortCircuit: true" option specified.  For more information see:
https://github.com/nodejs/node/commit/10bcad5c6e
2022-12-06 14:30:13 +00:00
Andrei Zeliankou 190691ade8 Tests: NJS. 2022-11-29 01:02:08 +00:00
Andrei Zeliankou b5952edcc6 Version bump. 2023-02-27 19:13:56 +00:00
Andrei Zeliankou 9ea5ed2813 Tests: fixed _check_processes() checks in "--restart" mode. 2022-11-15 01:07:41 +00:00
Andrei Zeliankou bb11ef694c Tests: removed migration test.
Migration of "share" behaviour was dropped after b57b4749b993.
2022-11-15 00:56:49 +00:00
Andrei Zeliankou 2c2156e236 Tests: fixed assertion in test_variables_dynamic. 2022-11-15 00:42:12 +00:00
Andrei Zeliankou 0d3b31e671 Tests: features and options checks improved.
Now version output evaluates only once.
OpenSSL checks more carefully.
2022-11-15 00:39:21 +00:00
Andrei Zeliankou 40d75c94a0 Optimization for the "--no-unix-sockets" case. 2022-11-15 00:17:32 +00:00
Andrei Zeliankou af5903ff4e Tests: added tests for the $request_time variable. 2022-10-13 10:13:57 +01:00