summaryrefslogtreecommitdiffhomepage
path: root/test/unit
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/unit
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/unit')
-rw-r--r--test/unit/applications/lang/go.py2
-rw-r--r--test/unit/applications/lang/java.py2
-rw-r--r--test/unit/applications/lang/node.py2
-rw-r--r--test/unit/applications/lang/perl.py2
-rw-r--r--test/unit/applications/lang/php.py2
-rw-r--r--test/unit/applications/lang/python.py2
-rw-r--r--test/unit/applications/lang/ruby.py2
-rw-r--r--test/unit/applications/tls.py2
-rw-r--r--test/unit/check/chroot.py2
-rw-r--r--test/unit/check/isolation.py14
-rw-r--r--test/unit/http.py2
11 files changed, 17 insertions, 17 deletions
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py
index 93e0738b..5aca5048 100644
--- a/test/unit/applications/lang/go.py
+++ b/test/unit/applications/lang/go.py
@@ -91,7 +91,7 @@ replace unit.nginx.org/go => {replace_path}
ApplicationGo.prepare_env(script, name, static=static_build)
conf = {
- "listeners": {"*:7080": {"pass": f"applications/{script}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{script}"}},
"applications": {
script: {
"type": "external",
diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py
index dc6d2bfc..4d207cea 100644
--- a/test/unit/applications/lang/java.py
+++ b/test/unit/applications/lang/java.py
@@ -97,7 +97,7 @@ class ApplicationJava(ApplicationProto):
script_path = f'{option.test_dir}/java/{script}/'
self._load_conf(
{
- "listeners": {"*:7080": {"pass": f"applications/{script}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{script}"}},
"applications": {
script: {
"unit_jars": f'{option.current_dir}/build',
diff --git a/test/unit/applications/lang/node.py b/test/unit/applications/lang/node.py
index 4f18c780..ff95fbd5 100644
--- a/test/unit/applications/lang/node.py
+++ b/test/unit/applications/lang/node.py
@@ -44,7 +44,7 @@ class ApplicationNode(ApplicationProto):
self._load_conf(
{
"listeners": {
- "*:7080": {"pass": f"applications/{quote(script, '')}"}
+ "*:8080": {"pass": f"applications/{quote(script, '')}"}
},
"applications": {
script: {
diff --git a/test/unit/applications/lang/perl.py b/test/unit/applications/lang/perl.py
index 037e98e8..e99c2aca 100644
--- a/test/unit/applications/lang/perl.py
+++ b/test/unit/applications/lang/perl.py
@@ -11,7 +11,7 @@ class ApplicationPerl(ApplicationProto):
self._load_conf(
{
- "listeners": {"*:7080": {"pass": f"applications/{script}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{script}"}},
"applications": {
script: {
"type": self.get_application_type(),
diff --git a/test/unit/applications/lang/php.py b/test/unit/applications/lang/php.py
index b9b6dbf1..2ab172b0 100644
--- a/test/unit/applications/lang/php.py
+++ b/test/unit/applications/lang/php.py
@@ -42,7 +42,7 @@ class ApplicationPHP(ApplicationProto):
self._load_conf(
{
- "listeners": {"*:7080": {"pass": f"applications/{script}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{script}"}},
"applications": {script: app},
},
**kwargs,
diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py
index 4e1fd897..67304d12 100644
--- a/test/unit/applications/lang/python.py
+++ b/test/unit/applications/lang/python.py
@@ -59,7 +59,7 @@ class ApplicationPython(ApplicationProto):
self._load_conf(
{
"listeners": {
- "*:7080": {"pass": f"applications/{quote(name, '')}"}
+ "*:8080": {"pass": f"applications/{quote(name, '')}"}
},
"applications": {name: app},
},
diff --git a/test/unit/applications/lang/ruby.py b/test/unit/applications/lang/ruby.py
index f6c4f6c3..1268f8c7 100644
--- a/test/unit/applications/lang/ruby.py
+++ b/test/unit/applications/lang/ruby.py
@@ -37,7 +37,7 @@ class ApplicationRuby(ApplicationProto):
self._load_conf(
{
- "listeners": {"*:7080": {"pass": f"applications/{script}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{script}"}},
"applications": {script: app},
},
**kwargs,
diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py
index e9bcc514..50a27348 100644
--- a/test/unit/applications/tls.py
+++ b/test/unit/applications/tls.py
@@ -97,7 +97,7 @@ distinguished_name = req_distinguished_name
script_path = f'{option.test_dir}/python/{script}'
self._load_conf(
{
- "listeners": {"*:7080": {"pass": f"applications/{name}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{name}"}},
"applications": {
name: {
"type": "python",
diff --git a/test/unit/check/chroot.py b/test/unit/check/chroot.py
index b749fab6..466b6ba4 100644
--- a/test/unit/check/chroot.py
+++ b/test/unit/check/chroot.py
@@ -15,7 +15,7 @@ def check_chroot():
addr=f'{option.temp_dir}/control.unit.sock',
body=json.dumps(
{
- "listeners": {"*:7080": {"pass": "routes"}},
+ "listeners": {"*:8080": {"pass": "routes"}},
"routes": [
{
"action": {
diff --git a/test/unit/check/isolation.py b/test/unit/check/isolation.py
index e4674f4d..e31179e8 100644
--- a/test/unit/check/isolation.py
+++ b/test/unit/check/isolation.py
@@ -21,7 +21,7 @@ def check_isolation():
ApplicationGo().prepare_env('empty', 'app')
conf = {
- "listeners": {"*:7080": {"pass": "applications/empty"}},
+ "listeners": {"*:8080": {"pass": "applications/empty"}},
"applications": {
"empty": {
"type": "external",
@@ -35,7 +35,7 @@ def check_isolation():
elif 'python' in available['modules']:
conf = {
- "listeners": {"*:7080": {"pass": "applications/empty"}},
+ "listeners": {"*:8080": {"pass": "applications/empty"}},
"applications": {
"empty": {
"type": "python",
@@ -50,7 +50,7 @@ def check_isolation():
elif 'php' in available['modules']:
conf = {
- "listeners": {"*:7080": {"pass": "applications/phpinfo"}},
+ "listeners": {"*:8080": {"pass": "applications/phpinfo"}},
"applications": {
"phpinfo": {
"type": "php",
@@ -67,7 +67,7 @@ def check_isolation():
ApplicationRuby().prepare_env('empty')
conf = {
- "listeners": {"*:7080": {"pass": "applications/empty"}},
+ "listeners": {"*:8080": {"pass": "applications/empty"}},
"applications": {
"empty": {
"type": "ruby",
@@ -83,7 +83,7 @@ def check_isolation():
ApplicationJava().prepare_env('empty')
conf = {
- "listeners": {"*:7080": {"pass": "applications/empty"}},
+ "listeners": {"*:8080": {"pass": "applications/empty"}},
"applications": {
"empty": {
"unit_jars": f"{option.current_dir}/build",
@@ -100,7 +100,7 @@ def check_isolation():
ApplicationNode().prepare_env('basic')
conf = {
- "listeners": {"*:7080": {"pass": "applications/basic"}},
+ "listeners": {"*:8080": {"pass": "applications/basic"}},
"applications": {
"basic": {
"type": "external",
@@ -114,7 +114,7 @@ def check_isolation():
elif 'perl' in available['modules']:
conf = {
- "listeners": {"*:7080": {"pass": "applications/body_empty"}},
+ "listeners": {"*:8080": {"pass": "applications/body_empty"}},
"applications": {
"body_empty": {
"type": "perl",
diff --git a/test/unit/http.py b/test/unit/http.py
index 347382f5..5a6a1a1b 100644
--- a/test/unit/http.py
+++ b/test/unit/http.py
@@ -13,7 +13,7 @@ from unit.option import option
class HTTP1:
def http(self, start_str, **kwargs):
sock_type = kwargs.get('sock_type', 'ipv4')
- port = kwargs.get('port', 7080)
+ port = kwargs.get('port', 8080)
url = kwargs.get('url', '/')
http = 'HTTP/1.0' if 'http_10' in kwargs else 'HTTP/1.1'