summaryrefslogtreecommitdiffhomepage
path: root/test/test_reconfigure_tls.py
diff options
context:
space:
mode:
authorDan Callahan <d.callahan@f5.com>2024-02-27 15:15:42 +0000
committerDan Callahan <d.callahan@f5.com>2024-02-27 15:15:42 +0000
commitd76761901c4084bcdbc5a449e9bbb47d56b7093c (patch)
treeb4b7b4e3d588b73a2adcc0094cab466d9194c679 /test/test_reconfigure_tls.py
parentc43629880472bba8d389dfb0b7ae6d883b0ba499 (diff)
parent088117008c9e8f397a58cc8d8070ce047beff12f (diff)
downloadunit-d76761901c4084bcdbc5a449e9bbb47d56b7093c.tar.gz
unit-d76761901c4084bcdbc5a449e9bbb47d56b7093c.tar.bz2
Merge tag '1.32.0' into branches/packaging1.32.0-1
Unit 1.32.0 release.
Diffstat (limited to 'test/test_reconfigure_tls.py')
-rw-r--r--test/test_reconfigure_tls.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/test_reconfigure_tls.py b/test/test_reconfigure_tls.py
index b473b147..4f7d344a 100644
--- a/test/test_reconfigure_tls.py
+++ b/test/test_reconfigure_tls.py
@@ -3,7 +3,9 @@ import ssl
import time
import pytest
+
from unit.applications.tls import ApplicationTLS
+from unit.option import option
prerequisites = {'modules': {'openssl': 'any'}}
@@ -20,7 +22,7 @@ def setup_method_fixture():
assert 'success' in client.conf(
{
"listeners": {
- "*:7080": {
+ "*:8080": {
"pass": "routes",
"tls": {"certificate": "default"},
}
@@ -40,7 +42,7 @@ def create_socket():
ssl_sock = ctx.wrap_socket(
s, server_hostname='localhost', do_handshake_on_connect=False
)
- ssl_sock.connect(('127.0.0.1', 7080))
+ ssl_sock.connect(('127.0.0.1', 8080))
return ssl_sock
@@ -51,7 +53,7 @@ def clear_conf():
@pytest.mark.skip('not yet')
def test_reconfigure_tls_switch():
- assert 'success' in client.conf_delete('listeners/*:7080/tls')
+ assert 'success' in client.conf_delete('listeners/*:8080/tls')
(_, sock) = client.get(
headers={'Host': 'localhost', 'Connection': 'keep-alive'},
@@ -61,7 +63,7 @@ def test_reconfigure_tls_switch():
assert 'success' in client.conf(
{"pass": "routes", "tls": {"certificate": "default"}},
- 'listeners/*:7080',
+ 'listeners/*:8080',
)
assert client.get(sock=sock)['status'] == 200, 'reconfigure'
@@ -69,6 +71,9 @@ def test_reconfigure_tls_switch():
def test_reconfigure_tls():
+ if option.configure_flag['asan']:
+ pytest.skip('not yet, router crash')
+
ssl_sock = create_socket()
ssl_sock.sendall("""GET / HTTP/1.1\r\n""".encode())
@@ -93,6 +98,8 @@ def test_reconfigure_tls_2():
clear_conf()
+ success = False
+
try:
ssl_sock.do_handshake()
except ssl.SSLError:
@@ -104,6 +111,9 @@ def test_reconfigure_tls_2():
def test_reconfigure_tls_3():
+ if option.configure_flag['asan']:
+ pytest.skip('not yet, router crash')
+
ssl_sock = create_socket()
ssl_sock.do_handshake()