Commit graph

48 commits

Author SHA1 Message Date
Max Romanov
900828cc4b Fixing isolated process PID manipulation.
Registering an isolated PID in the global PID hash is wrong
because it can be duplicated.  Isolated processes are stored only
in the children list until the response for the WHOAMI message is
processed and the global PID is discovered.

To remove isolated siblings, a pointer to the children list is
introduced in the nxt_process_init_t struct.

This closes #633 issue on GitHub.
2022-08-11 13:33:46 +01:00
Andrei Zeliankou
69e690affe Tests: added flags to search functions in proto.py.
Also removed unnesessary re.compile() calls.
2022-07-28 14:12:19 +01:00
Andrei Zeliankou
a3699557a3 Tests: minor improvements.
Added "go" availability check before trying to build an application.

update_action() method used were possible and fixed bug with
the relative path determination in test_static_chroot.py.

Templates optimization and style fixes.
2022-06-30 14:40:17 +01:00
Andrei Zeliankou
03a7701133 Tests: added more tests with reconfiguration. 2022-05-09 10:14:29 +01:00
Andrei Zeliankou
0f72534660 Tests: style. 2022-04-11 21:05:14 +01:00
Andrei Zeliankou
170752e96f Tests: added test with long certificate chain. 2022-02-15 21:43:02 +00:00
Andrei Zeliankou
e53ce40c58 Tests: removed TestApplicationTLS.get_server_certificate().
distutils.version is replaced by packaging.version.  Also minor style fixes.
2022-01-31 23:10:30 +00:00
Andrei Zeliankou
ae03585238 Tests: refactored working with processes. 2021-11-15 12:13:54 +00:00
Max Romanov
506ec2b825 Tests: app prototype related fixes. 2021-11-09 15:48:44 +03:00
Andrei Zeliankou
39adb292d5 Tests: style. 2021-10-18 01:10:11 +01:00
Max Romanov
cfba69781a Fixing multiple TLS-enabled listeners initialization.
Because of the incorrect 'last' field assignment, multiple listeners with
a TLS certificate did not initialize properly, which caused a router crash
while establishing a connection.

Test with multiple TLS listeners added.

The issue was introduced in the c548e46fe516 commit.

This closes #561 issue on GitHub.
2021-07-01 13:56:40 +03:00
Andrei Zeliankou
753ce145f7 Tests: added TLS test without close notify. 2021-05-26 21:47:12 +01:00
Andrei Zeliankou
25603eae9f Tests: added test for TLS with IP in SAN. 2021-05-12 14:37:25 +01:00
Andrei Zeliankou
a17f7e03d4 Tests: added test for TLS with empty Subject field. 2021-05-07 17:42:48 +01:00
Max Romanov
74b1b1fc17 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.
2021-04-08 19:11:11 +03:00
Andrei Zeliankou
6c97a1a069 Tests: style. 2021-04-05 14:03:05 +01:00
Andrei Zeliankou
4404097e05 Tests: added "--restart" option.
Now Unit do not restart after each test by default.
2021-02-08 23:32:27 +00:00
Andrei Zeliankou
d43a84139d Tests: added missing checks for configuration results. 2021-01-14 03:04:20 +00:00
Andrei Zeliankou
6dc9c47ccd Tests: style. 2021-01-13 06:22:43 +00:00
Andrei Zeliankou
b2e767819f Tests: skip_alert() converted to the fixture. 2020-12-08 14:37:33 +00:00
Andrei Zeliankou
07789a23e9 Tests: options moved to the separate class.
This change is necessary to separate the logic
and prevent possible circular dependency.
2020-12-06 16:01:59 +00:00
Max Romanov
567f0a7b30 Tests: fixing tests interrupt in terminal.
KeyboardInterrupt re-raised.
2020-11-16 20:37:01 +03:00
Andrei Zeliankou
54837759f3 Tests: fixed unit.log print. 2020-10-19 22:25:29 +01:00
Andrei Zeliankou
6ec0ff3596 Tests: minor fixes. 2020-10-07 23:18:43 +01:00
Andrei Zeliankou
d5e9159340 Tests: migrated to the pytest. 2020-09-16 21:31:15 +01:00
Andrei Zeliankou
ce4a2bbd05 Tests: style. 2020-05-15 04:20:56 +01:00
Andrei Zeliankou
6a9a4fe0d4 Tests: introduced module version specification in prerequisites. 2020-04-24 05:08:56 +01:00
Andrei Zeliankou
0bfa09dfa0 Tests: minor fixes and style. 2020-04-14 02:35:04 +01:00
Andrei Zeliankou
f36f0f2461 Tests: redirect tests output to the stdout. 2020-03-10 18:10:42 +00:00
Tiago Natel de Moura
12e15ba43b Tests: added test for uploading files with SSL.
* * *
[mq]: multipart
2020-02-05 13:29:41 +00:00
Andrey Zelenkov
65ca2d7b19 Tests: refactored prerequisites model. 2019-09-14 14:44:35 +03:00
Andrey Zelenkov
b097476824 Tests: TestApplicationTLS.openssl_conf() introduced. 2019-07-14 23:49:37 +03:00
Andrey Zelenkov
ff5413f109 Tests: removed unnecessary initialization.
That could leads to the incorrect behaviour in test_tls_application_respawn.
2019-07-14 23:47:49 +03:00
Andrey Zelenkov
ee1f0365d2 Tests: removed unused import. 2019-07-14 23:47:07 +03:00
Andrey Zelenkov
d7516e5f4e Tests: made openssl certificates more strong to avoid errors. 2019-07-08 20:46:06 +03:00
Andrey Zelenkov
90c5d3f5c0 Tests: adjusted skipping tests. 2019-05-30 16:46:04 +03:00
Valentin Bartenev
c1a3b06d03 Tests: using "pass" option instead of deprecated "application". 2019-04-22 18:20:53 +03:00
Andrey Zelenkov
29b4e4431f Tests: speed up tests. 2019-04-09 20:59:35 +03:00
Andrey Zelenkov
549f0873c2 Tests: wait_for_record() introduced. 2019-04-09 16:14:42 +03:00
Andrey Zelenkov
af24e4dec4 Tests: simplified module checking. 2019-04-09 16:14:42 +03:00
Andrey Zelenkov
19eba1730a Tests: unit module refactoring. 2019-03-28 18:43:13 +03:00
Andrey Zelenkov
281899fcef Tests: style. 2019-03-26 23:38:30 +03:00
Max Romanov
452ce0789e Adjusting request schema value according to connection tls state.
This closes #223 issue on GitHub.
2019-03-21 13:55:57 +03:00
Andrey Zelenkov
4de2c8b567 Tests: added "Host" and "Connetion" headers where necessary.
Also minor header organizing.
2019-02-27 19:15:02 +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
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
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
Andrey Zelenkov
d0e428aace Tests: TLS tests. 2018-09-20 16:34:34 +03:00