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
08dab702cb
Tests: reworked "test_variables.py".
...
Access log used for the variables testing instead of limited routing.
Added missed test for $status variable.
Some tests moved from "test_access_log.py" to "test_variables.py".
2022-10-11 13:49:44 +01:00
Andrei Zeliankou
c65e04682e
Tests: minor fixes.
2022-09-07 01:11:04 +01:00
Andrei Zeliankou
698680d894
Tests: added tests for the log format.
...
Also added tests for the following variables:
$request_line, $time_local, $bytes_sent, and $status.
2022-07-28 14:13:03 +01:00
Andrei Zeliankou
39adb292d5
Tests: style.
2021-10-18 01:10:11 +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
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
f5ac143246
Tests: unit_stop() removed where possible.
...
Since wait_for_record() was introduced there is no need
to stop Unit before parsing unit.log.
2021-01-12 06:20:23 +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
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
f36f0f2461
Tests: redirect tests output to the stdout.
2020-03-10 18:10:42 +00:00
Andrey Zelenkov
38cfe4cf3d
Tests: added USR1 signal test for unit.log.
2019-10-23 16:59:53 +03:00
Andrey Zelenkov
f878b6eea5
Tests: style.
2019-10-23 16:05:52 +03:00
Andrey Zelenkov
f5b1ac0dc6
Tests: check initial configuration in test_access_log.py.
2019-10-23 16:05:44 +03:00
Andrey Zelenkov
65ca2d7b19
Tests: refactored prerequisites model.
2019-09-14 14:44:35 +03:00
Andrey Zelenkov
fdf570f1d9
Tests: added delay before SIGQUIT in access_log partial tests.
...
This change is necessary to avoid race between
client connection close and Unit close.
Also "read_timeout" value decreased to speed up tests.
2019-08-01 18:15:00 +03:00
Andrey Zelenkov
90c5d3f5c0
Tests: adjusted skipping tests.
2019-05-30 16:46:04 +03:00
Andrey Zelenkov
5d15d8449d
Tests: read_timeout increased for incomplete requests.
...
Also fixed test without \"Host\" header.
2019-04-22 18:52:35 +03:00
Valentin Bartenev
c1a3b06d03
Tests: using "pass" option instead of deprecated "application".
2019-04-22 18:20:53 +03:00
Andrey Zelenkov
0f8a602c3c
Tests: added time to handle requests in access_log partial tests.
2019-04-15 15:52:32 +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
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
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
511a0fa760
Tests: used relative path for configuration.
2018-09-06 20:18:33 +03:00
Andrey Zelenkov
d9f8479375
Tests: response handling improved.
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
Andrey Zelenkov
961e8d800f
Tests: re-opening access log file.
2018-04-18 16:02:43 +03:00
Andrey Zelenkov
62aa3a5dae
Tests: access_log tests.
2018-04-11 18:34:11 +03:00