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.
This commit is contained in:
Andrei Zeliankou
2023-11-08 18:37:02 +00:00
parent 78c133d0ca
commit 0b85fe29f7
101 changed files with 412 additions and 412 deletions

View File

@@ -12,7 +12,7 @@ prerequisites = {'modules': {'python': 'any', 'openssl': 'any'}}
client = ApplicationTLS()
def add_tls(application='empty', cert='default', port=7080):
def add_tls(application='empty', cert='default', port=8080):
assert 'success' in client.conf(
{
"pass": f"applications/{application}",
@@ -85,7 +85,7 @@ basicConstraints = critical,CA:TRUE"""
f.write('')
def remove_tls(application='empty', port=7080):
def remove_tls(application='empty', port=8080):
assert 'success' in client.conf(
{"pass": f"applications/{application}"}, f'listeners/*:{port}'
)
@@ -178,12 +178,12 @@ def test_tls_certificate_update():
add_tls()
cert_old = ssl.get_server_certificate(('127.0.0.1', 7080))
cert_old = ssl.get_server_certificate(('127.0.0.1', 8080))
client.certificate()
assert cert_old != ssl.get_server_certificate(
('127.0.0.1', 7080)
('127.0.0.1', 8080)
), 'update certificate'
@@ -207,12 +207,12 @@ def test_tls_certificate_change():
add_tls()
cert_old = ssl.get_server_certificate(('127.0.0.1', 7080))
cert_old = ssl.get_server_certificate(('127.0.0.1', 8080))
add_tls(cert='new')
assert cert_old != ssl.get_server_certificate(
('127.0.0.1', 7080)
('127.0.0.1', 8080)
), 'change certificate'
@@ -542,7 +542,7 @@ def test_tls_no_close_notify():
assert 'success' in client.conf(
{
"listeners": {
"*:7080": {
"*:8080": {
"pass": "routes",
"tls": {"certificate": "default"},
}
@@ -576,7 +576,7 @@ def test_tls_keepalive_certificate_remove():
)
assert 'success' in client.conf(
{"pass": "applications/empty"}, 'listeners/*:7080'
{"pass": "applications/empty"}, 'listeners/*:8080'
)
assert 'success' in client.conf_delete('/certificates/default')
@@ -697,8 +697,8 @@ def test_tls_multi_listener():
client.certificate()
add_tls()
add_tls(port=7081)
add_tls(port=8081)
assert client.get_ssl()['status'] == 200, 'listener #1'
assert client.get_ssl(port=7081)['status'] == 200, 'listener #2'
assert client.get_ssl(port=8081)['status'] == 200, 'listener #2'