summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_basic.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_python_basic.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_python_basic.py')
-rw-r--r--test/test_python_basic.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/test_python_basic.py b/test/test_python_basic.py
index 37859c8c..81c768aa 100644
--- a/test/test_python_basic.py
+++ b/test/test_python_basic.py
@@ -14,7 +14,7 @@ conf_app = {
}
conf_basic = {
- "listeners": {"*:7080": {"pass": "applications/app"}},
+ "listeners": {"*:8080": {"pass": "applications/app"}},
"applications": conf_app,
}
@@ -64,14 +64,14 @@ def test_python_get_listeners():
assert 'success' in client.conf(conf_basic)
assert client.conf_get()['listeners'] == {
- "*:7080": {"pass": "applications/app"}
+ "*:8080": {"pass": "applications/app"}
}, 'listeners'
assert client.conf_get('listeners') == {
- "*:7080": {"pass": "applications/app"}
+ "*:8080": {"pass": "applications/app"}
}, 'listeners prefix'
- assert client.conf_get('listeners/*:7080') == {
+ assert client.conf_get('listeners/*:8080') == {
"pass": "applications/app"
}, 'listeners prefix 2'
@@ -79,23 +79,23 @@ def test_python_get_listeners():
def test_python_change_listener():
assert 'success' in client.conf(conf_basic)
assert 'success' in client.conf(
- {"*:7081": {"pass": "applications/app"}}, 'listeners'
+ {"*:8081": {"pass": "applications/app"}}, 'listeners'
)
assert client.conf_get('listeners') == {
- "*:7081": {"pass": "applications/app"}
+ "*:8081": {"pass": "applications/app"}
}, 'change listener'
def test_python_add_listener():
assert 'success' in client.conf(conf_basic)
assert 'success' in client.conf(
- {"pass": "applications/app"}, 'listeners/*:7082'
+ {"pass": "applications/app"}, 'listeners/*:8082'
)
assert client.conf_get('listeners') == {
- "*:7080": {"pass": "applications/app"},
- "*:7082": {"pass": "applications/app"},
+ "*:8080": {"pass": "applications/app"},
+ "*:8082": {"pass": "applications/app"},
}, 'add listener'
@@ -117,7 +117,7 @@ def test_python_delete():
assert 'success' in client.conf(conf_basic)
assert 'error' in client.conf_delete('applications/app')
- assert 'success' in client.conf_delete('listeners/*:7080')
+ assert 'success' in client.conf_delete('listeners/*:8080')
assert 'success' in client.conf_delete('applications/app')
assert 'error' in client.conf_delete('applications/app')
@@ -130,5 +130,5 @@ def test_python_delete_blocks():
assert 'success' in client.conf(conf_app, 'applications')
assert 'success' in client.conf(
- {"*:7081": {"pass": "applications/app"}}, 'listeners'
+ {"*:8081": {"pass": "applications/app"}}, 'listeners'
), 'applications restore'