Andrei Zeliankou
cf73fb8093
Tests: test_proxy_invalid simplified.
2020-05-15 04:20:45 +01:00
Axel Duch
26f407e24a
Tests: decode uri and args.
2020-05-14 12:29:22 +02:00
Valentin Bartenev
0174c971b5
Configuration: URI encoding in the "pass" option.
...
This is useful to escape "/" in path fragments. For example, in order
to reference the application named "foo/bar":
{
"pass": "applications/foo%2Fbar"
}
2020-05-14 13:15:00 +03:00
Andrei Zeliankou
d803ec39bc
Tests: added respawn tests.
2020-05-12 17:59:47 +01:00
Andrei Zeliankou
6a9a4fe0d4
Tests: introduced module version specification in prerequisites.
2020-04-24 05:08:56 +01:00
Andrei Zeliankou
8f6e6086cb
Tests: skips adjusted.
2020-04-20 14:04:55 +01:00
Andrei Zeliankou
3c58a4bfc1
Tests: added test with rescheduling requests.
2020-04-14 03:02:16 +01:00
Andrei Zeliankou
0bfa09dfa0
Tests: minor fixes and style.
2020-04-14 02:35:04 +01:00
Valentin Bartenev
c7f5c1c664
Controller: improved handling of unix domain control socket.
...
One of the ways to detect Unit's startup and subsequent readiness to accept
commands relies on waiting for the control socket file to be created.
Earlier, it was unreliable due to a race condition between the client's
connect() and the daemon's listen() calls after the socket's bind() call.
Now, unix domain listening sockets are created with a nxt_listen_socket_create()
call as follows:
s = socket();
unlink("path/to/socket.tmp")
bind(s, "path/to/socket.tmp");
listen(s);
rename("path/to/socket.tmp", "path/to/socket");
This eliminates a time-lapse when the socket file is already created but nobody
is listening on it yet, which therefore prevents the condition described above.
Also, it allows reliably detecting whether the socket is being used or simply
wasn't cleaned after the daemon stopped abruptly. A successful connection to
the socket file means the daemon has been started; otherwise, the file can be
overwritten.
2020-04-08 15:15:24 +03:00
Andrei Zeliankou
a49023229e
Tests: use "return" action in upstream tests.
2020-04-03 01:49:18 +01:00
Andrei Zeliankou
d7aa514d6a
Tests: added notification on "read_timeout" expiration.
2020-04-03 01:46:59 +01:00
Andrei Zeliankou
2bb8b3d88a
Tests: minor fixes.
2020-04-03 01:03:26 +01:00
Andrei Zeliankou
5954839773
Tests: added tests for rational numbers in upstream server weight.
2020-03-30 18:44:50 +01:00
Max Romanov
0935630cba
Fixing application process infinite loop.
...
Main process exiting before app process init may have caused hanging.
2020-03-30 14:18:51 +03:00
Max Romanov
ab7b42a072
Handling change file message in libunit.
...
This is required for proper log file rotation action.
2020-03-30 14:18:41 +03:00
Andrei Zeliankou
f94e31b294
Tests: added tests for "location" option.
2020-03-27 17:29:45 +00:00
Andrei Zeliankou
6e5b5d2a0b
Tests: added tests for "return" action.
2020-03-27 15:50:09 +00:00
Andrei Zeliankou
5f2d07019c
Tests: increase default "read_timeout" to 60s in message_read().
2020-03-27 15:48:39 +00:00
Andrei Zeliankou
8532cf6ae6
Tests: added tests for comments in JSON.
2020-03-25 19:40:08 +00:00
Andrei Zeliankou
2e4ad9fbc0
Tests: UTF-8 BOM test.
2020-03-25 19:31:42 +00:00
Andrei Zeliankou
48ad88ee72
Tests: increase default "read_timeout" value to 60s.
...
This change is necessary to avoid errors on slow hosts.
Also slightly reworked argument passing to the recvall() function.
2020-03-23 19:18:26 +00:00
Andrei Zeliankou
ac9ca6d75c
Tests: added notification on unsuccessful connect().
2020-03-23 19:12:22 +00:00
Andrei Zeliankou
b0161df42e
Tests: wait for unit.pid file before running tests.
...
Waiting for control.unit.sock was replaced by unit.pid due to current problem
with race between connect() and listen() calls for control.unit.sock.
This change should be reverted after fix.
2020-03-23 19:09:29 +00:00
Andrei Zeliankou
3fd4b4cfab
Tests: rearranging functions in main.py.
2020-03-23 02:13:46 +00:00
Andrei Zeliankou
c7cc247baa
Tests: terminate unitd process on exit().
2020-03-23 02:12:44 +00:00
Andrei Zeliankou
93207d4a8c
Tests: test_python_procman.py refactored.
2020-03-19 03:17:00 +00:00
Andrei Zeliankou
06c790ac1e
Tests: fixed prerequisite in test_share_fallback.py.
2020-03-19 03:15:50 +00:00
Max Romanov
c6f9ca79e6
Fixing body fd access racing condition.
...
To avoid closing the body fd prematurely, the fd value is moved from
the request struct to the app link. The body fd should not be closed
immediately after the request is sent to the application due to possible
request rescheduling.
2020-03-17 14:44:11 +03:00
Andrei Zeliankou
baf9230398
Tests: skip "close failed" alert in test_proxy_parallel test.
2020-03-12 17:14:16 +00:00
Max Romanov
5296be0b82
Using disk file to store large request body.
...
This closes #386 on GitHub.
2020-03-12 17:54:29 +03:00
Max Romanov
f3e6726098
Tests: added Python input readline and iterator tests.
2020-03-12 17:54:15 +03:00
Andrei Zeliankou
23636ce02c
Tests: fixed race in USR1 signal tests.
...
Also, minor style fixes applied.
2020-03-12 13:48:54 +00:00
Andrei Zeliankou
1d75277767
Tests: round robin upstream tests.
2020-03-12 13:47:43 +00:00
Andrei Zeliankou
961674af42
Tests: skip "last message send failed" alerts globally.
2020-03-12 13:44:30 +00:00
Andrei Zeliankou
b214b7c690
Tests: more routing tests with negative rules.
2020-01-31 18:12:16 +00:00
Andrei Zeliankou
f092b093f5
Tests: use blocking to print unit.log files.
2020-03-10 18:13:47 +00:00
Andrei Zeliankou
f36f0f2461
Tests: redirect tests output to the stdout.
2020-03-10 18:10:42 +00:00
Valentin Bartenev
810b8dbb67
Tests: unitd stderr output redirected to unit.log.
...
A part of the debug log was printed to stderr before the log file was opened.
Now, this output is redirected to the same log file.
2020-03-06 20:08:38 +03:00
Valentin Bartenev
3617d4ed03
Tests: simplified unitd process running.
...
There are no reasons to wrap the Unit daemon in a separate Python process.
2020-03-06 20:08:29 +03:00
Tiago Natel de Moura
80763b3e64
Tests: chdir() and open() for PHP module.
...
These tests ensure optimizations in the chdir calls don't break
SAPI semantics.
2020-03-03 18:53:26 +00:00
Andrei Zeliankou
293b0da520
Tests: added tests for "fallback" option for the "share" action.
2020-03-03 18:17:31 +00:00
Andrei Zeliankou
3b7b2fae54
Tests: check unique options in "action" object.
2020-03-03 17:54:02 +00:00
Valentin Bartenev
a60f856ce2
Improved validation of the "action" object.
...
Now it enforces the mutual exclusivity of "pass", "proxy", and "share" options.
2020-03-03 20:37:47 +03:00
Andrei Zeliankou
f68947bc60
Tests: truncated huge messages while logging.
2020-03-02 13:10:38 +00:00
Andrei Zeliankou
5d67879a50
Tests: added "-r" option to print unit.log on failures.
2020-02-27 18:41:24 +00:00
Andrei Zeliankou
fbc72d7fec
Tests: added test with invalid IPv6 address in routing block.
2020-02-27 01:37:54 +00:00
Andrei Zeliankou
f519e31e2d
Tests: more static tests.
2020-02-21 15:08:38 +00:00
Andrei Zeliankou
5406d1e320
Tests: added PHP test with invalid index extension only.
2020-02-20 21:06:56 +00:00
Andrei Zeliankou
1f2445b01b
Tests: added proxy test with large body.
2020-02-20 21:06:31 +00:00
Andrei Zeliankou
fcca366392
Tests: more tests with "max_body_size".
2020-02-20 20:33:49 +00:00