Commit Graph

17 Commits

Author SHA1 Message Date
Zhidao HONG
3711632c00 Var: improved variable parsing with empty names.
Unit parsed the case of "$uri$$host" into unknown variables.
This commit makes it invalid variable instead.
2022-11-20 23:11:41 +08:00
Andrei Zeliankou
2c2156e236 Tests: fixed assertion in test_variables_dynamic. 2022-11-15 00:42:12 +00:00
Andrei Zeliankou
af5903ff4e Tests: added tests for the $request_time variable. 2022-10-13 10:13:57 +01: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
Andrew Clayton
02659b1ee3 Tests: added tests for translating $dollar into a literal $.
If you need to specify a $ in a URI you can now use '$dollar' or
'${dollar}'.

Added some tests for the above to test_variables.py setting a Location
string.
2022-07-20 23:28:06 +01:00
Andrei Zeliankou
a1cda6455f Tests: added tests for more HTTP variables. 2022-07-19 17:34:32 +01:00
Andrei Zeliankou
d358b1d448 Tests: added tests for dynamic variables. 2022-07-14 11:50:41 +01:00
Andrei Zeliankou
161230b955 Tests: improved test for $request_uri variable. 2022-06-01 16:40:27 +01:00
Alejandro Colomar
aee8b9bfb2 Tests: Added tests for $request_uri. 2022-05-31 12:41:11 +02: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
Zhidao HONG
d16cf04167 Router: fixed segmentation fault.
In the case that routes or upstreams is empty and the pass option is a variable.
If the resolved pass is routes or upstreams, a segment error occurred.
2021-08-02 12:30:38 +08:00
Andrei Zeliankou
6c97a1a069 Tests: style. 2021-04-05 14:03:05 +01:00
Andrei Zeliankou
54837759f3 Tests: fixed unit.log print. 2020-10-19 22:25:29 +01:00
Andrei Zeliankou
98c86c415c Tests: added variable test with nonexistent upstream. 2020-09-21 21:29:34 +01:00
Andrei Zeliankou
d5e9159340 Tests: migrated to the pytest. 2020-09-16 21:31:15 +01:00
Andrei Zeliankou
df374057f7 Tests: $host varaible test.
Also added few tests for $uri and minor style fixes.
2020-08-31 03:14:02 +01:00
Andrei Zeliankou
c40e45344f Tests: added variables tests. 2020-08-13 13:17:01 +01:00