Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This patch consist of 3 tests:
1. Ensure that $request_uri won't change while proxying the request.
2. Same as 1, but modifying the request using the "rewrite" directive.
3. Same as 2, but with rewrite containing a percent-encoded string.
|
|
Also fixed various pylint errors and style issues.
|
|
After the launch of the project, the testing infrastructure was shared with
nginx project in some cases. To avoid port overlap, a decision was made
to shift the port range for Unit tests. This problem was resolved a long time
ago and is no longer relevant, so it is now safe to use port 8XXX range as the
default, as it is more appropriate for testing purposes.
|
|
This variable contains a string that is formed using random data and
can be used as a unique request identifier.
This closes #714 issue on GitHub.
|
|
|
|
|
|
Class usage came from the unittest framework and it was always redundant
after migration to the pytest. This commit removes classes from files
containing tests to make them more readable and understandable.
|
|
Prerequisites check moved to the module level to simplify class structure.
Discovery and prerequisites checks functions moved to the separate files.
Introduced "require" fixture to provide per-test requirements check.
|
|
Common methods from applications/proto.py converted to the fixtures.
sysctl check moved to the specific file where it is using.
Some options moved to the constructor to have early access.
|
|
|
|
|
|
To make fixtures accessible inside of setup methods in tests all these methods
are renamed to the "setup_method_fixture" and decorated by autouse flag.
Also all setup methods moved to the top of the files.
|
|
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.
|
|
Unit parsed the case of "$uri$$host" into unknown variables.
This commit makes it invalid variable instead.
|
|
|
|
|
|
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".
|
|
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.
|
|
|
|
|
|
|
|
|
|
distutils.version is replaced by packaging.version. Also minor style fixes.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Also added few tests for $uri and minor style fixes.
|
|
|