summaryrefslogtreecommitdiffhomepage
path: root/test/test_php_application.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_php_application.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 '')
-rw-r--r--test/test_php_application.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py
index 17440909..8a6641cb 100644
--- a/test/test_php_application.py
+++ b/test/test_php_application.py
@@ -174,7 +174,7 @@ def test_php_application_query_string_empty():
def test_php_application_query_string_rewrite():
assert 'success' in client.conf(
{
- "listeners": {"*:7080": {"pass": "routes"}},
+ "listeners": {"*:8080": {"pass": "routes"}},
"routes": [
{
"action": {
@@ -678,7 +678,7 @@ def test_php_application_error_log(findall, wait_for_record):
def test_php_application_script():
assert 'success' in client.conf(
{
- "listeners": {"*:7080": {"pass": "applications/script"}},
+ "listeners": {"*:8080": {"pass": "applications/script"}},
"applications": {
"script": {
"type": client.get_application_type(),
@@ -699,7 +699,7 @@ def test_php_application_script():
def test_php_application_index_default():
assert 'success' in client.conf(
{
- "listeners": {"*:7080": {"pass": "applications/phpinfo"}},
+ "listeners": {"*:8080": {"pass": "applications/phpinfo"}},
"applications": {
"phpinfo": {
"type": client.get_application_type(),
@@ -727,7 +727,7 @@ def test_php_application_trailing_slash(temp_dir):
assert 'success' in client.conf(
{
"listeners": {
- "*:7080": {"pass": "applications/php-path"},
+ "*:8080": {"pass": "applications/php-path"},
f'unix:{addr}': {"pass": "applications/php-path"},
},
"applications": {
@@ -745,7 +745,7 @@ def test_php_application_trailing_slash(temp_dir):
resp = client.get(url='/path?q=a')
assert resp['status'] == 301, 'uri without trailing /'
assert (
- resp['headers']['Location'] == 'http://localhost:7080/path/?q=a'
+ resp['headers']['Location'] == 'http://localhost:8080/path/?q=a'
), 'Location with query string'
resp = client.get(
@@ -767,7 +767,7 @@ def test_php_application_forbidden(temp_dir):
assert 'success' in client.conf(
{
- "listeners": {"*:7080": {"pass": "applications/php-path"}},
+ "listeners": {"*:8080": {"pass": "applications/php-path"}},
"applications": {
"php-path": {
"type": client.get_application_type(),
@@ -792,7 +792,7 @@ def test_php_application_extension_check(temp_dir):
assert 'success' in client.conf(
{
- "listeners": {"*:7080": {"pass": "applications/phpinfo"}},
+ "listeners": {"*:8080": {"pass": "applications/phpinfo"}},
"applications": {
"phpinfo": {
"type": client.get_application_type(),