summaryrefslogtreecommitdiffhomepage
path: root/test/test_forwarded_header.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-11-08 18:37:02 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2023-11-08 18:37:02 +0000
commit0b85fe29f7e49c88cab88aa9303d5885fa9c9dd5 (patch)
tree329ee87058eea8631596c802c23f39b78ad9446b /test/test_forwarded_header.py
parent78c133d0ca3c343135e123a087970837afdebed1 (diff)
downloadunit-0b85fe29f7e49c88cab88aa9303d5885fa9c9dd5.tar.gz
unit-0b85fe29f7e49c88cab88aa9303d5885fa9c9dd5.tar.bz2
Tests: 8XXX used as default port range.
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.
Diffstat (limited to 'test/test_forwarded_header.py')
-rw-r--r--test/test_forwarded_header.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_forwarded_header.py b/test/test_forwarded_header.py
index c3f4a4c6..eaa83dce 100644
--- a/test/test_forwarded_header.py
+++ b/test/test_forwarded_header.py
@@ -14,11 +14,11 @@ def setup_method_fixture():
def forwarded_header(forwarded):
assert 'success' in client.conf(
{
- "127.0.0.1:7081": {
+ "127.0.0.1:8081": {
"forwarded": forwarded,
"pass": "applications/forwarded_header",
},
- "[::1]:7082": {
+ "[::1]:8082": {
"forwarded": forwarded,
"pass": "applications/forwarded_header",
},
@@ -28,7 +28,7 @@ def forwarded_header(forwarded):
def get_fwd(sock_type='ipv4', xff=None, xfp=None):
- port = 7081 if sock_type == 'ipv4' else 7082
+ port = 8081 if sock_type == 'ipv4' else 8082
headers = {'Connection': 'close'}
@@ -243,7 +243,7 @@ def test_forwarded_header_source_range():
def test_forwarded_header_invalid():
assert 'error' in client.conf(
{
- "127.0.0.1:7081": {
+ "127.0.0.1:8081": {
"forwarded": {"source": '127.0.0.1'},
"pass": "applications/forwarded_header",
}
@@ -254,7 +254,7 @@ def test_forwarded_header_invalid():
def check_invalid_source(source):
assert 'error' in client.conf(
{
- "127.0.0.1:7081": {
+ "127.0.0.1:8081": {
"forwarded": {
"client_ip": "X-Forwarded-For",
"source": source,