Commit graph

140 commits

Author SHA1 Message Date
Andrey Zelenkov
17068d2cdc Tests: removed skipping Go tests on x86. 2018-12-25 21:28:02 +03:00
Andrey Zelenkov
5964413066 Tests: added delay to wait for error logging. 2018-12-25 17:22:32 +03:00
Andrey Zelenkov
4ccf0c8a17 Tests: fixed test_tls_reconfigure.
Previously, order of applying TLS configuration and sending partial request to
the application was uncertain.  These changes make sure that client-application
connection was established before reconfiguration.  Additionally, added test
to check that non-TLS connection works correctly after reconfiguration.
2018-12-25 16:35:35 +03:00
Andrey Zelenkov
f5b7fee128 Tests: set TCP_NODELAY option by default. 2018-12-25 16:35:35 +03:00
Andrey Zelenkov
d625691ff4 Tests: test_node_application_write_before_writeHead reworked.
Added res.end() call in application and response status check.
Also, renamed to test_node_application_write_before_write_head.
2018-12-25 16:35:35 +03:00
Andrey Zelenkov
f57e729a11 Tests: expectedFailure's removed from test_node_application.py.
Also removed alert skip in test_node_application_write_before_writeHead.

Fixes committed in 1340e3539362, 1e008ef94f43, 5df32621af19, dae402cb243f
and 41f561b3a178.
2018-12-25 16:35:35 +03:00
Andrey Zelenkov
f9a3328a25 Tests: more QUERY_STRING tests. 2018-12-24 20:35:18 +03:00
Andrey Zelenkov
aafa4bbaf9 Tests: more Node.js tests. 2018-12-11 18:30:58 +03:00
Andrey Zelenkov
37cd6d23b6 Tests: PHP directives "disable_classes" and "disable_functions". 2018-11-28 03:14:38 +03:00
Andrey Zelenkov
2ef5011236 Tests: fixed test_node_application_write_callback.
Fixed the write() callback order test.
Also introduced a separate test to verify the callback call itself.
2018-12-04 19:05:10 +03:00
Sergey Kandaurov
0fdc7c3a55 Tests: Node.js application tests. 2018-10-25 15:43:48 +03:00
Andrey Zelenkov
41d3d63758 Tests: class prefix made optional. 2018-11-15 21:26:15 +03:00
Andrey Zelenkov
eff760bd2b Tests: added command line arguments parsing in tests.
Added the following command line arguments:

  -d, --detailed: Show detailed output for tests

    Usage examples:

    ./test/run.py --detailed
    python3 test/test_access_log.py --detailed
    python3 test/test_access_log.py -d TestUnitAccessLog.test_access_log_ipv6


  -l, --log: Save unit.log after the test execution

    Usage examples:

    ./test/run.py -l
    python3 test/test_access_log.py -l
    python3 test/test_access_log.py --log TestUnitAccessLog.test_access_log_ipv6
2018-11-15 21:26:15 +03:00
Andrey Zelenkov
cf1f84b67c Tests: print path to unit.log file when it was saved. 2018-11-13 18:56:18 +03:00
Andrey Zelenkov
4d7f708b25 Tests: leave unit.log in case of error or failure. 2018-11-13 18:51:55 +03:00
Sergey Kandaurov
3061e8333d Tests: provide openssl.conf in test_tls_certificate_key_ec.
Previously, test failed if openssl was unable to load config info,
or the system's openssl.cnf was picked up, which is wrong as well.
2018-10-18 18:46:21 +03:00
Valentin Bartenev
029c1a9f50 Renamed "go" application type to "external".
There's nothing specific to Go language.  This type of application object can
be used to run any external application that utilizes libunit API.
2018-10-09 17:53:31 +03:00
Igor Sysoev
b5d4fc939e Disabled chunked transfer encoding for 204 responses. 2018-09-28 17:32:02 +03:00
Andrey Zelenkov
d0e428aace Tests: TLS tests. 2018-09-20 16:34:34 +03:00
Valentin Bartenev
510c2e15c5 Python: adjusted input.read(size) argument value interpretation.
Previously, passing 0 resulted in reading the whole body and all negative
values raised an exception.

Now the behaviour is in consistentance with io.RawIOBase.read() interface,
and passing 0 returns empty (byte) string, while -1 results in reading the
whole body.
2018-09-20 16:04:49 +03:00
Andrey Zelenkov
8065ba84aa Tests: test_settings_header_read_timeout_update adjusted. 2018-09-17 19:07:29 +03:00
Andrey Zelenkov
511a0fa760 Tests: used relative path for configuration. 2018-09-06 20:18:33 +03:00
Andrey Zelenkov
58d23eb5b4 Tests: fixed test_settings_header_read_timeout_update. 2018-09-04 02:30:27 +03:00
Andrey Zelenkov
9f5349d347 Tests: "no_recv" option introduced. 2018-09-04 02:30:27 +03:00
Andrey Zelenkov
6bebbe3e8a Tests: "/config" prefix used. 2018-09-04 02:30:27 +03:00
Andrey Zelenkov
dea7e0dc87 Tests: more timeout tests. 2018-08-21 20:49:23 +03:00
Andrey Zelenkov
a4e75be524 Tests: typo. 2018-08-21 20:41:36 +03:00
Max Romanov
86740ab34b Introducing app joint to accurate app release.
For accurate app descriptor release, it is required to count the number of
use counts.  Use count increased when:
- app linked to configuration app queue;
- socket conf stores pointer to app;
- request for start app process posted to router service thread;

Application port has pointer to app, but it does not increase use count
to avoid use count loop.

Timer needs a pointer to nxt_timer_t which is stored in engine timers tree.
nxt_timer_t now resides in nxt_app_joint_t and does not lock the application.

Start process port RPC handlers is also linked to nxt_app_joint_t.

App joint (nxt_app_joint_t) is a 'weak pointer':
- single threaded;
- use countable;
- store pointer to nxt_app_t (which can be NULL);

nxt_app_t has pointer to nxt_app_joint_t and update its pointer to app.
2018-08-10 19:27:13 +03:00
Andrey Zelenkov
6c0c3dcaa7 Tests: simple "Transfer-Encoding" client header test. 2018-08-08 15:36:30 +03:00
Andrey Zelenkov
eee6102a28 Tests: more reconfigure tests. 2018-08-08 15:30:05 +03:00
Andrey Zelenkov
09268676ef Tests: remove unused function.
This function was accidentally added in e0f0cd7d244a.
2018-08-06 19:40:37 +03:00
Max Romanov
b021188e95 Python: decoding unicode strings as Latin1.
According to PEP 3333, header names and values should be decoded as Latin1.
2018-08-06 19:16:45 +03:00
Max Romanov
1bb22d1e92 Unit application library.
Library now used in all language modules.
Old 'nxt_app_*' code removed.

See src/test/nxt_unit_app_test.c for usage sample.
2018-08-06 17:27:33 +03:00
Andrey Zelenkov
b6ce2da65c Tests: expectedFailure removed from test_settings_idle_timeout.
Fix committed in f04b28aa6e02.
2018-07-30 20:07:31 +03:00
Andrey Zelenkov
7f57b6d984 Tests: fixed test_settings_idle_timeout. 2018-07-30 17:01:14 +03:00
Andrey Zelenkov
a458f50d59 Tests: fixed header value char tests.
Use byte strings to avoid problems with encoding.
2018-07-30 16:40:52 +03:00
Andrey Zelenkov
cfe91315eb Tests: HTTP settings. 2018-07-13 20:15:50 +03:00
Andrey Zelenkov
96a4f9f032 Tests: more php.ini options tests. 2018-07-11 19:35:46 +03:00
Andrey Zelenkov
223ba37ab5 Tests: more chars in header values tests. 2018-07-11 19:35:36 +03:00
Andrey Zelenkov
b82954a5af Tests: empty configuration. 2018-07-11 19:35:23 +03:00
Andrey Zelenkov
f2a856aa3b Tests: Go application tests. 2018-06-08 18:32:55 +03:00
Andrey Zelenkov
2b39ed5dfb Tests: added tests for "precision" option in php.ini. 2018-06-07 21:13:55 +03:00
Andrey Zelenkov
857bddeea6 Tests: added keep-alive with reconfiguration test. 2018-05-30 19:29:40 +03:00
Andrey Zelenkov
569a907dbb Tests: configuration of environment variables. 2018-05-29 15:29:01 +03:00
Andrey Zelenkov
3b7238996a Tests: initial PHP application tests. 2018-05-22 20:20:14 +03:00
Andrey Zelenkov
7d224bfc9e Tests: added tests for SERVER_SOFTWARE variable. 2018-05-21 16:41:33 +03:00
Andrey Zelenkov
d9f8479375 Tests: response handling improved. 2018-04-26 17:37:24 +03:00
Andrey Zelenkov
a44d358f29 Tests: added test for callable write() in Python. 2018-04-26 17:37:24 +03:00
Andrey Zelenkov
0658f9bd71 Tests: added access log test with unix socket. 2018-04-23 15:26:52 +03:00
Andrey Zelenkov
b6226d6945 Tests: added delay to wait for requests logging. 2018-04-23 15:26:46 +03:00